Wednesday 27 August 2014

HTML Headings

HTML Headings:


Headings are important in HTML documents.

Headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least important heading.
Example
<h1>BaseTutorial</h1>
<h2>BaseTutorial</h2>
<h3>BaseTutorial</h3>


Note: Browsers automatically add some empty space (a margin) before and after each heading.

Headings Are Important


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.
Since 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> tag creates a horizontal line in an HTML page.
The hr element can be used to separate content:
Example
<p>basetutorial.</p>
<hr>
<p>Free Online Tutorial.</p>
<hr>
<p>base tutorial.</p>


HTML Line Breaks

Use the <br> tag if you want a line break (a new line) without starting a new paragraph:
Example
<p>This is<br>a para<br>graph with line breaks</p>

HTML Text Formatting

<!DOCTYPE html>
<html>
<body>

<p><b>This text is bold</b></p>
<p><strong>This text is strong</strong></p>
<p><i>This text is italic</i></p>
<p><em>This text is emphasized</em></p>
<p><code>This is computer output</code></p>
<p>This is<sub> subscript</sub> and <sup>superscript</sup></p>

</body>
</html>

Comment tags <!-- and --> are used to insert comments in HTML.
<!-- This is a comment -->

<p>This is a paragraph.</p>

<!-- Remember to add more information here -->


< PREVIOUS                                                                NEXT >

No comments:

Post a Comment