HTML CSS IMAGES LINKS
 
HTML → Bold and Center tags

Now that you have placed you name in the body section, you might wish to center it or make it bold.



Bold

First, let's make your name bold. To do this, you need to embed your name between a <b> and a </b>. This is the bold tag. It directs the browser to display any string of words encased in it to appear bold in the browser.

<html>
<head>
<title>HTML Design and Construction</title>
</head>
<body>
<b> Ori Kleiner </b>
</body>
</html>



Center

Now let's center your name. To do this, you need to embed your name within a <center> and a </center>:

<html>
<head>
<title>HTML Design and Construction</title>
</head>
<body>
<center> Ori Kleiner</center>
</body>
</html>


Centered and Bold

<html>
<head>
<title>HTML Design and Construction</title>
</head>
<body>
<b> <center> Ori Kleiner </center> </b>
</body>
</html>

While the order in which you embed you tags does not matter, it is suggested that you follow a symmetrical structure.

Wrong: <b> <center> Ori Kleiner</b> </center>

Right: <b> <center> Ori Kleiner </center> </b>

Deprecation - The center element was deprecated in HTML 4.01. A deprecated element or attribute is one that has been outdated. Deprecated elements may become obsolete in the future, but browsers should continue to support them for backward compatibility.

While the center element is deprecated, it is still important to be familiar with its usage as it is a common tag. Later on we will look into CSS to learn about a replacement for the center tag.



 
  back ↑