Headings are important in HTML documents.Don't skip the level of headings in your document for example don't start with a level one heading <h1> and then next use a level three <h3> heading.
headings are typicaly displayed in larger and bolder fonts than normal body fonts.
- Headings are defined with the <h1> to <h6> tags.
- <h1> defines the largest heading. <h6> defines the smallest heading.
HTML HEADING | Preview |
---|---|
<h1>This is first heading</h1> | This is first heading |
<h2>This is second heading</h2> | This is second heading |
<h3>This is third heading</h3> | This is third heading |
<h4>This is fourth heading</h4> | This is fourth heading |
<h5>This is fifth heading</h5> | This is fifth heading |
<h6>This is sixth heading</h6> | This is sixth heading |
Importance of headings
- Use HTML headings for headings only.
- Don't use headings to make text BIG or bold.
- Search engines use your headings to index the structure and content of your web pages.
- Users may skim your pages by its headings, it is important to use headings to show the document structure.
- H1 headings should be used as main headings, followed by H2 headings, then the less important H3 headings, and so on.
HTML LINES
- The hr(horizontal row) element can be used to separate content.
- The <hr /> tag creates a horizontal line in an HTML page.
- <hr/> used for making of line in html document.
HTML Line Example |
---|
<p>This is a paragraph</p> <hr /> <p>This is a paragraph</p> |
HTML Comments
- Comments can be inserted into the HTML code to make it more readable and understandable.
- Comments are ignored by the browser and are not displayed into the browser.
HTML Comment Example |
---|
<!-- This is a comment --> |
How to View HTML Source
Have you ever seen a Web page and wondered "Hey! How did they do that?"- To find out, right-click in the page and select "View Source" (IE) or "View Page Source" (Firefox), or similar for other browsers. This will open a window containing the HTML code of the page.
0 comments:
Post a Comment
Please leave some comment.