HTML Headings
Time to add a little structure to your site.
<h1> to <h6>
Headings in HTML are done by tags: <h1>, <h2>, <h3>, <h4>, <h5>, <h6>.<h1> is the biggest heading and <h6> is the smallest. The h1 tag should be the first heading on your page and use smaller headings for sub-headings. Here is an example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title> My first home page title </title> </head> <body> <h1>My very first webpage</h1> <p>Welcome to your first webpage, it now has headings and a little bit of
structure</p> <h2>What you have learnt so far</h2> <p>You have learnt how to make a webpage, format the text and create headings.<br> It was quite fun =).</p> </body> </html>
The heading tags also create one line break after the heading.
Tips:
- Use the h1 tag at the top of your page
- As sub headings use h2 h3 h4 h5 and h6
- Remember h1 is the biggest heading and h6 is the smallest
In the next section of this beginner HTML tutorial you will learn how to create links.
Next page: links in HTML
Back: Beginner HTML tutorial: Index

