HTML Tutorial
.
  HTML Tags.
.
The PARAGRAPH tag surrounds each paragraph in an html file. Without it, text will simply run continuously in the web page regardless of how it is set out in your text editor. Add the text on the right to your file between the BODY tags.
<P>Alice was beginning to get very tired.</P>
<P>Once or twice she had peeped into the
book her sister was reading, but it had no
pictures.</P>
Most tags have properties or attributes which further refine the way the document is displayed in the browser. Attributes and their values are defined within the angular brackets of the opening tag. For example, text within a paragraph can be aligned left, right or center.
<P ALIGN="center">
Align the first paragraph in the center as shown. Save the file and refresh the browser. Do this each time you wish to view changes to your file.
Note the American spelling
of center, the UK spelling of
centre will not work.
The background color of the page can be changed by defining the BGCOLOR attribute in the BODY tag. Edit the BODY tag as shown on the right.
<BODY BGCOLOR="aqua">
<BODY BGCOLOR="aqua"  TEXT="blue">
To change the foreground or text color, add the TEXT attribute to the BODY tag as shown.
Not all colors look the same on all operating systems. A color on a web page may have a slightly different shade on a Windows computer and an Apple Mac computer, for example. Only 216 colors have been identified as showing exactly the same on all operating systems. These colors are referred to as the Web Safe Color Palette.
As operating systems and screen
resolutions have become more
advanced, it has become less
important to confine color choices
to colors from the web safe palette.
There are about 140 named colors that you can define to color parts of your web page. Often you will wish to use colors which do not have names and so you will need to define that color by its hexadecimal code, for example, aqua can also be defined as #00FFFF and blue as #0000FF.
When working with color, I recommend PagePainter which is
available free from www.pagepainter.com. This Color Scheme
Editor enables you to choose colors from the web safe palette
or 16 million color palette, collect colors in a color sample book
and apply those colors directly to your web page. PagePainter
provides the tools and environment to enable you to work easily
and efficiently in this important area of web page design.
Often there are slight differences in the way that different browsers display named colors. Hexadecimal codes are more reliable as well as providing a means of defining any of the millions of possible color shades. Change the background color of your web page to #CCFFFF and the text color to #333366.
HTML provides six levels of headings. The H1 tag produces the largest heading size and H6 the smallest. Add the following heading above the first paragraph in your source code.
<H1>Down the Rabbit Hole</H1>
<H1 ALIGN="center">Down the Rabbit Hole</H1>
HEADING tags may also contain the ALIGN attribute. Align the heading text in the center of the page as shown.
All attributes have a default value. If you do not define a value for an attribute then the tag displays with the default value. For example, the ALIGN attribute has a default value of LEFT. Remove the ALIGN attribute from the first paragraph to accept the default value.

<< Back                   Next >>
.