- HTML (Hyper Text Markup Language) is a very simple
language used to "describe" the logical structure of a document.
- For example, it can describe which text the browser should
emphasize, which text should be considered body text versus header
text, and so forth.
- Firstly, document description is defined by "HTML tags" that are
instructions embedded within a less-than (<) and a greater-than
(>) sign. To begin formatting, you specify a format type within
the < and the >. Most tags in HTML are ended with a similar
tag with a slash in it to specify an end to the formatting. For
example, to emphasize some text, you would use the following HTML
code:
this text is not bold
<EM>this text is bold</EM>
- It is important to note that the formatting codes within an HTML
tag are case-insensitive. Thus, the following two versions
of the bold
tag would both be understood by a web browser:
<em>this text is bold</em>
this text is not
<EM>this text is bold</EM>
- You can also compound formatting styles together in HTML. However,
you should be very careful to "nest" your code correctly. For example,
the following HTML code shows correct and incorrect nesting:
<CENTER><EM>this text is bolded and centered
correctly</EM></CENTER>
<EM><CENTER>this text is bolded and centered
incorrectly</EM></CENTER>
- In the incorrect version, notice that the bold tag was closed
before the center tag, even though the bold tag was opened first. The
general rule is that tags on the inside should be closed before tags on
the outside.