Tip:
Highlight text to annotate it
X
Hello! Welcome to lectiideinformatica.net
In this video tutorial HTML we will discuss about headings.
Headings are part of the html markup elements
You should know that there are six levels of headings
Namely H1, H2, H3, H4, H5, H6
H1 is the largest level.
and H6 is the lowest level
Headings is used especially for the titles, contents, links.
and to highlight some text
Let's take an example to know what it is about
We will use Crimson editor
It is an open source editor
We start with html tag
Any page html must start with DOCTYPE declaration.
I do not have to use this doctype declaration for simplicity
But in reality, any html page must begin with the doctype declaration
I recommend you that always when you open a tag at the same time, close it
It's better that way because it is likely to remain not close the tag
Let's put a title
Follow body tag
Closing the body tag
Now I write headings
H1
and we write heading1
and we close the h1 tag
And now I have to use copy paste to put the other levels
Let's replace 1 with 2,3,4,5,6
save into folder
Name the file
I have to call it heading
and select the html
to display into browser. Take the tools - View in browser
Notice how they appear headings in browser.
Note that h1 is the highest level
and following h2, h3,h4,h5,h6
h6 is the smallest level.
Headings are often used with the align attribute
The align attribute has four values: left, right, center, justify.
Let's see how it behaves in real.
Follow lesson tags, attributes values to know more about these things on the site lectiideinformatica.net
Align is the attribute and values are left, right, center, justify
Save
And to display in browser.
Note that the Heading positions has changed
because I used the align attribute with values: left, right, center, justify.
Heading 1 is left
This is center
This is right
This is justify
And the is left
And center
I must warn you that use the align attribute is deprecated in HTML tag
nd it is recommended to use this align in CSS - Cascading Style Sheet
In future versions of HTML this attribute is possible to be removed.
Thank you for participating in this video tutorial html - heading