Saturday, December 13, 2014

Learn HTML for beginner : Headings

They are h1h2h3h4h5 and h6h1 being the almighty emperor of headings and h6 being the lowest pleb.
Change your code to the following:

<!DOCTYPE html>

<html>

<head>
<title>My first web page</title>
</head>

<body>
<h1>My first web page</h1>

<h2>What this is</h2>
<p>A simple page put together using HTML</p>

<h2>Why this is</h2>
<p>To learn HTML</p>
</body>

</html>
Note that the h1 tag is only used once, as the main heading of the page. h2 to h6, however, can be used as often as desired, but they should always be used in order, as they were intended. For example, an h4 should be a sub-heading of an h3, which should be a sub-heading of an h2

No comments:

Post a Comment