Horizontal Lines on HTML

Horizontal Lines :
 Tag hr HTML Horizontal Line - Attributes and styles
• Horizontal lines are used to visually break-up sections of a document.
• The <hr> tag creates a line from the current position in the document to the
  right margin and breaks the line accordingly.
• <hr /> tag is also an example of the empty element, where you do not need
   opening and closing tags, as there is nothing to go in between them.
• The <hr /> element has a space between the characters hr and the forward slash. If you omit this
   space, older browsers will have trouble rendering the horizontal line, while if you miss the             forward slash character and just use <hr> it is not valid in XHTML.

Example :

<!DOCTYPE html>
<html>
<head>
<title>Horizontal Line Example</title>
</head>
<body>
<p>This is paragraph one and should be on top</p>
<hr />
<p>This is paragraph two and should be at bottom</p>
</body>
</html>

OUTPUT:

This is paragraph one and should be on top


This is paragraph two and should be at bottom

Comments

Popular posts from this blog

Set Font Colour

HTML FONTS

HTML Table Heading