HTML
Horizontal Line:
Horizontal
lines used to separate different areas of a web page. The <hr> tag defines a break in an HTML page, by a
horizontal line. rule.
The <hr> element is used to separate content in an
HTML page
Example:
·
· Write the following code the notepad
<html>
<body>
<h1>
this is 1 heading </h1> <hr>
<h1>
this is 1 heading </h1> <hr>
</html>
</body>
· Save the file as “Horizontal.html”
· Double click on the file. The following page will appear on the web page.
Line
breaks are used to decide where the text will break(stop) on a line.
The HTML <br>
element
defines a line break.
Use <br>
if you
want a line break (a new line) without starting a new paragraph
Example:
· Write the
following in notepad
<html>
<body>
<p> this is <br> My book <br> its color
<br> is red <br> </p>
</html>
</body>
· Save as
“breaks.html”
· Double click the file. The web page will appear as
below
Comments
Post a Comment
Please do not enter any spam link in the comment box