HTML title paragraph

HTML title

In a HTML document, the title is important.

Heading is defined by tags such as <h1> - <h6>.

<h1> defines the largest title. <h6> defines the smallest title.

Instance 
Note : The browser automatically adds a blank line before and after the title.

Note : By default, HTML automatically adds an extra blank line before and after the block-level element, such as before and after the paragraph and title elements.

The title is important

Make sure to use the HTML heading tag only for the title. Don't just use the title to produce bold or large text.

Search engines use headings to index the structure and content of your web pages.

coz users can quickly navigate through your pages with headlines, it's important to use title to present the structure of the document.

H1 should be used as the main heading (most important), followed by h2 (secondary), followed by h3, and so on.

HTML horizontal line

The <hr /> tag creates a horizontal line in the HTML page.

The hr element can be used to separate content.

Instance
The following code will output the title and horizontal lines

The above code outputs the <h1> header and the <h6> header, as well as two horizontal lines.

HTML paragraph

Paragraphs are defined by the <p> tag.

See the example directly

Instance
Program running result:
this is the first paragraph.
this is the second paragraph.

Note : The browser automatically adds a blank line before and after the paragraph. (<p> is a block-level element)

Tip : Using an empty paragraph mark <p></p> to insert a blank line is a bad habit. Replace it with a <br /> tag! (But don't use the <br /> tag to create a list. Don't worry, you'll learn about HTML lists later.)

Don't forget to end the label
Even if you forget to use the end tag, most browsers will display the HTML correctly, like this:

Program running result:
Forgot the end tag
Forgot the end tag    

The above example is fine in most browsers, but don't rely on it. Forgetting to use the end tag can produce unexpected results and errors.

Note : End tags are not allowed in future HTML versions.

Tip : Closing HTML by closing tags is a way to write HTML that will stand the test of the future. Clearly marking where an element starts and ends where it makes the code easier to understand, both for you and for the browser.

HTML wrap

If you want to wrap (new line) without generating a new paragraph, use the <br /> tag

The <br /> element is an empty HTML element. Since closing a tag doesn't make sense, it doesn't end the tag.

Instance
Program running result:
If you 
requires a
newline  
paragraph, 
use the br tag. 


Last Updated: 2018-07-06 12:32:44 By akshay

SHARE THIS

share_facebook share_twitter share_google_plus

Please Comment Here :