HTML Div tags paragraph and font tags
 

 Home > HTML Div, Paragraph and Font

 

Div Tag

A division tag can be used to specify the characteristics of a large section of page elements. It is written as <div><!-- HTML elements --></div> . The <div> tag can be used to control the alignment of a section of a web page by using the align parameter:

Align
align="left" {or right, center}

For example:
<div align="center"><!-- HTML elements --></div>

 

HTML Paragraph Tag

Text can be divided into paragraphs by using a paragraph tag. It is written as <p><!-- paragraph text --></p>. This forces a blank line between the paragraphs, unlike <br> which simple forces a new line. The text alignment can be controlled by the align parameter:

Align
align="left" {or right, center}

For example:
<p align="center"><!-- HTML elements --></p>

HTML Font Tag

The <font> tag is a container tag which has no effect by itself, but when parameters are added it can be used to specify a range of text characteristics. An important point to note is that its use assumes that the specified font is available on the viewers computer or device. For that reason, it is not a good idea to specify unusual fonts, and several options should be included.

Face
face="Arial, Helvetica, sans-serif"

Size
size="2"
The size is expressed as a scale from 1 to 7. It can be 'absolute' eg size="4", or relative to the base font size (usually 3) eg size=+2 (ie size="5"). A font size of 1 is roughly equivalent to a pointsize of 8, size 2 is point size 10, size 3 is point size 12 etc.

<font size="1"> font size 1 </font>
<font size="2"> font size 2</font>
<font size="3"> font size 3</font>
<font size="4"> font size 4</font>
<font size="5"> font size 5</font>
<font size="6"> font size 6</font>
<font size="7">size 7</font>

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).

A typical font tag would be:
<font face="Arial, Helvetica, sans-serif" size="2" color="red"> font size 2</font>

 
© marketstormer.com | copyright | terms and conditions | disclaimer | privacy policy