-
Notifications
You must be signed in to change notification settings - Fork 0
Adding headers to a webpage
The heading tags are used to define document heading on a web page.
There are 6 heading tags and each one outputs the text with a different font size with h1 outputting text the biggest text and h6 outputting the smallest text. The text size gets smaller as the number next to the h increases. The heading tag will inserts a line break before and after the text.
- h1 – Heading 1
- h2 – Heading 2
- h3 – Heading 3
- h4 – Heading 4
- h5 – Heading 5
- h6 – Heading 6
To use the heading tags just write the following text in the body section of your webpage: <h1>Text to display on page</h1>
. This will display the text as a level 1 heading on the page. If you wanted to use the heading 5 tag then you would write the text as <h5>Text to display on page</h5>
. This page goes over how to setup a simple web page if you want to try it yourself.
Below are examples of how each heading tag is displayed in the browser:
Always Learning
- Home
- Websites
- Linux
- Java
- Gradle
- JUnit
- Database