Horizontal Rule Tag

Horizontal Tag <hr>:-
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.


Syntax:-

<HR align="left |right center" size="pixels" width ="pixels or percentage " color ="color name">

Attributes of <hr> Tag:-


Attribute
Value
Description
align
left
center
right

Specifies the alignment of a <hr> element
noshade
noshade
Specifies that a <hr> element should render in one solid color (noshaded), instead of a shaded color
size
pixels
Specifies the height of a <hr> element
width
pixels
%

Specifies the width of a <hr> element


Example:-

<html>
<head>
<title>Index | horizontal </title>

<head>
<body bgcolor="lightblue" text="black">
<!-- example of formatting tags  -->
<h2>Text formatting Tags</h2>
<b> - Bold text</b><br>
<strong> - Important text</strong><br>
<i> - Italic text</i><br>
<em> - Emphasized text</em><br>
<mark> - Marked text</mark><br>
<small> - Small text<small><br>
<del> - Deleted text</del><br>
<ins> - Inserted text</ins><br>
<sub> - Subscript text</sub><br>
<sup> - Superscript text</sup><br>

<h4>Formatting Tags in the Paragraph</h4>
<hr align="center" size="5" width="50%" color="green">

<b>Notepad</b> is a basic <i>text-editing program</i> and 
it's most commonly used to <mark>view or edit text files.</mark> 
A text file is a file type typically identified by the .
txt file name <u>extension</u>.

<body>


</html>

The output of the above example :-




To download HTML File:- CLICKHERE

Comments

Popular posts from this blog

Body tag < body > < / body>

Heading Tag ( h1 to h6)