![]() |
HTML Tutorial 3Headers, Horizontal Rules & Line breaks |
|
|
A header tag can be used to specify important information such as a page or paragraph title. It is written as <h1><!-- header content --></h1> . The number in the tag specifies the size of text and can range from 1 to 6. <h1>This is size 1</h1><h2>This is size 2</h2><h3>This is size 3</h3><h4>This is size 4</h4><h5>This is size 5</h5><h6>This is size 6</h6>
|
|
|
<hr> Horizontal Rule |
A web page can be
divided into sections by using the horizontal rule tag <hr>. It
produces a default line like:
Parameters can be added to change the appearance of the line:
Width
width="200" or width="50%"
The width of the line can be expressed in pixels or as a percentage
of the container - eg window or table cell.
Height
height="5"
The height of the line can be expressed in pixels
Align
align="left" {or right, center}
The height of the line can be expressed in pixels
Color
color="red" or color="#ff0000"
The color of the line can be expressed as a named color or a hexadecimal
number (see Web Colors).
Noshade
noshade
If this parameter is present, the line will not have a three dimensional
appearance.
If the parameters
above are added to the <hr> tag to give:
<hr width="50%" size="10" align="center"
color="#00ff00" noshade>
the result is:
The <hr> tag should be used sparingly as it splits a web page horizontally and not often recognised as a good design feature.
![]()
<br>,<nobr>
and <wbr> tag
The <br> tag is use to insert a line break. A line break will always occur at this point.
The <nobr> tag will ensure no line breaks occur until the </nobr> tag is reached. This will give some very wide pages if you forget to use the end tag, so be careful
The <wbr> tag can be placed between the <nobr></nobr> tags to create a line break only if needed. It is referred to as a soft line break and does not force a break unless the line is wider than the window.
| © & Design by systemalchemy.com |