![]() |
![]() |
General discussion of site Learning HTML Planning and building Going live HTML editors Web development resources Ongoing skills development Web databases |
Learning HTML Basic layout
/ formatting tags
This section looks at: Unlike documents written in word processors, using a "carriage return" in an HTML document won't automatically create a line or paragraph break. A sentence which looks like this in your word processor or text editor...
...will look like this in your browser, if you haven't used tags to insert line and paragraph breaks
To create breaks, the following tags are used:
For example:
Note that the <BR> tag is not used in pairs. The tags most commonly used to control the way characters look are <B> (bold) and <I> (italic). The column on the left shows the HTML coding used the produce the effects on the right:
The <HR> tag is used to insert a horizontal line across the page. Note that this tag is not used in pairs. In other words, no closing tag is used. The example below illustrates the default horizontal line width or thickness:
It is also possible to specify the width of the horizontal rule to make it thicker or thinner. For example:
The most commonly used list types are the unordered (bulleted) list, and the ordered (numbered) list. Unordered lists are created with the<UL> tag, ordered lists with <OL>. Both types of list use the <LI> tag to specify list items: Unordered (bulleted) list:
Ordered (numbered) list:
HTML makes provision for six levels of heading, <H1> through <H6> as illustrated below:
These tags are intended to be used to indicate the logical structure of the document, not just to control the size of the text. The default alignment of headings is to the left. Alignment can be controlled using the ALIGN="RIGHT" and ALIGN="CENTER" attributes within the opening <H> tag:
The default alignment of paragraphs is to the left. Alignment can be controlled using the ALIGN="RIGHT" and ALIGN="CENTER" attributes within the opening <P> tag:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||