HTML < hr > Tag - Learn About Website | DaddyFile

0

HTML <hr> Tag

Example

Use the <hr> tag to define a thematic change in the content:

<h1>HTML</h1>
<p>HTML is a language for describing web pages.....</p>

<hr>

<h1>CSS</h1>
<p>CSS defines how to display HTML elements.....</p>

Definition and Usage

The <hr> tag defines a thematic break in an HTML page (e.g. a shift of topic).
The <hr> element is used to separate content (or define a change) in an HTML page.

Differences Between HTML 4.01 and HTML5

In HTML5, the <hr> tag defines a thematic break.
In HTML 4.01, the <hr> tag represents a horizontal rule.
However, the <hr> tag may still be displayed as a horizontal rule in visual browsers, but is now defined in semantic terms, rather than presentational terms.
All the layout attributes are removed in HTML5. Use CSS instead.

Differences Between HTML and XHTML

In HTML, the <hr> tag has no end tag.
In XHTML, the <hr> tag must be properly closed, like this: <hr />.

Post a Comment

 
Top