Basic
HTML Tutorial: The <DIV> Tag
Home > Build
> Programming > HTML
> Basic
HTML Tutorial
1.15 Dividing text into groups
with the <DIV> tag
The <DIV> tag is a useful way to divide
your text into groups. It only supports one attribute, and
that is the ALIGN attribute, but can be helpful in other ways,
specifically in Cascading Style Sheets. Unfortunately CSS
is too advanced for us to discuss here. The <DIV> tag
is also a way to change alignment without breaking your text
into a new paragraph.
Here is an example of the <DIV> tag:
<HTML>
<HEAD>
<TITLE>Roses are Red</TITLE>
</HEAD>
<BODY>
<DIV ALIGN="left">
Roses are Red<BR>
Violets are Blue<BR>
</DIV>
<DIV ALIGN="right">
You Love me<BR>
And I Love You too<BR>
</DIV>
</BODY>
</HTML>
See
it in the Browser: