HTML Horizontal Rule
You can specify parameters or attributes for horizontal rule like SIZE, WIDTH, NOSHADE, ALIGN(Left, Center, Right),COLOR .
<hr width="50%"> width in percent
<hr width ="100"> width in pixels
<hr size=5>
<hr size=1 noshade>
<hr color="#00ff00">
<hr align=”left/center/right”>
<hr> tag without any attribute.
Example: 1
<head>
</head>
<body>
<h1>Hello world.</h1>
<hr >
<p> Reaction ends possibilities and action opens up new horizons. </p>
</body>
</html>
Output
Hello world.
Reaction ends possibilities and action opens up new horizons.
<hr > tag with "align" and "width" attribute.
Example: 2
<html>
<head>
</head>
<body>
<h1 align="center">Hello world.</h1>
<hr align="center" width="50%" />
<p> Reaction ends possibilities and action opens up new horizons.
</p>
</body>
</html>
Output
Hello world.
Reaction ends possibilities and action opens up new horizons.
<hr > tag with "width" and "size" attribute.
Example: 3
<html>
<head>
</head>
<body>
<h1 align="center">Hello world.</h1>
<hr width="50%" size="5" />
<p> Reaction ends possibilities and action opens up new horizons.
</p>
</body>
</html>
Output
Hello world.
Reaction ends possibilities and action opens up new horizons.
<hr > tag with "width" , "size" and "noshade" attribute.
Example: 4
<html>
<head>
</head>
<body>
<h1 align="center">Hello world.</h1>
<hr width="50%" size="3" noshade />
<p> Reaction ends possibilities and action opens up new horizons.
</p>
</body>
</html>
Output
Hello world.
Reaction ends possibilities and action opens up new horizons.
<hr > tag with "width" ,"color" and "size" attribute.
Example: 5
<html>
<head>
</head>
<body>
<h1 align="center">Hello world.</h1>
<hr width="25%" color="#00ff00" size="7" />
<p> Reaction ends possibilities and action opens up new horizons.
</p>
</body>
</html>
Output
Hello world.
Reaction ends possibilities and action opens up new horizons.
No comments:
Post a Comment