HTML and CSS Reference
In-Depth Information
ology and concepts. Using the correct terminology is important both to avoid confusion
and to aid your own and others' understanding.
Three fundamental building blocks make up an HTML document: elements, attrib-
utes, and text (content). Consider the following HTML code snippet for creating a link:
<a href="about.html">About Us</a>
The element is the a (which stands for anchor ) element, which generates a clickable
link to another HTML page or other resource. The element is composed of two tags :
the starting tag ( <a> ) and the ending tag ( </a> ), which are also known as the start
and end tag or the opening and closing tag. The attribute is the text that appears inside
the starting tag as a name/value pair. Finally, the text content (which appears in the web
page when this code is viewed in the browser) appears between the opening and closing
tags (see Figure 1-3 ).
Figure 1-3. Fundamental components of a typical HTML snippet showing element, attribute, con-
tent, and tags.
Elements are the M in HTML; they are the markup instructs a web browser on how to
handle some content. Each element has a keyword, such as body , p , a , img , and so
on, that defines what it is (body element, paragraph element, anchor element, and image
element, respectively). Different elements define different types of behaviors, such as
creating links, embedding images, and so on. You may hear of an element being referred
Search WWH ::

Custom Search