01 HTML Introduction To HTML
01 HTML Introduction To HTML
An HTML page contains HTML tags, which are embedded commands that
supply information about the page's structure, appearance, and contents. The
documents themselves are plain text files (ASCII) with special "tags" or codes
that a browser knows how to interpret and display on your screen. These tags
are called Container, which have two types: Container tags and Empty tags.
Both types of tags offer tag Attributes. Tag Attributes are options that affect or
enhance the way the tag displays content in the Web browser window. Tags
and attributes work together to identify parts of the document and how the Web
browser should display them.
The < > and < / > are called Angle Bracket. All tags are comprised of angle
brackets. The angle brackets tell the browser that the text between them is an
HTML command. The HTML commands contain text or other Web page
elements and tell the Web browser how to display them.
Thinking of tag-sets, as containers will help in another way. It will help you
remember that tags should always be balanced. In other words, you should
keep containers nested within each other, just as you would have to do in the
real world. Let's try some visual examples where we actually draw the
containers:
Why should you worry about this? Well, if you start overlapping containers as
shown on the Figure 1, about the best you can expect is that the document will
be formatted in unexpected ways.
One more thing to keep in mind with regards to containers, since HTML is
based on these structures, it is often the case that the arrangement of text
within a container is irrelevant. For example, within a paragraph container, all of
the text can be in one long line, or in a series of separate lines, or with every
word on its own line. These would all be displayed exactly the same.
Container Tags
Container tags require an < > open tag and < / > closing tag; in other words,
one tag turns the HTML command on, and the closing tag turns it off. This tells
the browser when to begin the command and when to end it. Most of the tags
that you will be using will be container tags. Container tags are more command
because HTML formats elements as a whole.
Empty Tags
Empty tags do not require a closing tag. An empty tag executes an HTML
command that embeds an element all on its own. Once you type the tag to
execute a specific HTML command, the browser reads the command and
executes it.
Attributes
Attributes are options that affect or enhance the way the tag displays content on
the Web page. An attributes is made of three components: the name of the
attribute, the = sign, and the value of the attributes. Attributes are optional parts
of tags that add more detail to the content they contain.