Home :: Learning HTML :: Some Terms
As was mentioned in the Introduction to HTML, we use elements to mark up Web pages. We use tags to actually show where elements are. This is important to understand, so we'll go over it again.
Elements begin with a Starting Tag, which consists of an angled bracket, "<" (less than sign), the "code name" of the element, and another angled bracket, ">" (greater than sign). Much of learning HTML involves learning these "code names" and what part of a document a particular element describes. Attributes can be added to tags to suggest a different appearance, or to alter the function, of an element. Attributes of the element are put in the Starting Tag. Elements end with a Closing Tag, which consist of the angled bracket and a slash, "</", the "code name" again, and a final angled bracket, ">". Attributes are never put in a Closing Tag.
Here's an example element, dissected for you. Don't worry about what this particular element does yet. We just want to look at its parts.
<H1 ALIGN="CENTER">Getting Started</H1> || |Name| |Value_|||__The Text___|| || || | || | || || |_An Attribute|| | || || | |The|| ||_The Starting Tag| Closing Tag | | |_______Level One Heading Element_______|
This is a Level One Heading element, or an H1 element. It's probably easier to call it an H1 element, because that is the tag we use to mark up the text (Getting Started) as a level one heading. An attribute is being applied to this element. The attribute name is ALIGN and the attribute value is CENTER. Attribute values should always go in quotes.
The contents of this element is the text "Getting Started." Contents refers to anything the element contains. Contents can be text or other elements and their contents. Another part of learning HTML is learning what elements can be contained in other elements. Later on, we'll learn about Block Level elements and Text Level elements. A good rule to remember is that Block Level elements can contain Text Level elements, and Text Level elements can contain other Text Level elements. Text Level elements can never contain Block Level elements.
Some elements do not have any contents. They are called empty elements. Since they are empty, they do not have a Closing Tag. Empty elements can take attributes, though, since they do have a Starting Tag.
Home:: Learning HTML :: Some Terms
Home |
Policies |
HTML |
FAQ
Publishing |
Booklet |
Tools |
Links