Welcome guest


XHTML Tags

Tags are used to classify a piece of content in your webpage. Tags identify content such as: an image, a link to another page, a paragraph, formatted text, and the list goes on.

Tags are generally formatted in this manner, though there are exceptions.

    <tag>information inside of tag</tag>

The first <tag> is the opening tag which states what action you are about to perform and the second </tag> ends whatever action your just performed.. For example, if you wanted to make the word Hello bold, you would type it like this:

<b> Hello </b>.

Tags can be “nested” inside of one another. For example, you can have a paragraph of text and it contain bold text, italicized text, or a combination of the two. It is important to note that that last tag that was opened, should be the first tag that you close. Remember to work in reverse, that way you will always have the perfect syntax.

    <tag> text <tag2> more text </tag2> </tag>

While previous HTML standards allowed for either lower or upper case tags, new (X)HTML standards require that all tags be lower cased. For the sake of this course, we will require tags to be in all lower case.

    <tag> </tag>

Tags may also have attributes. These attributes may specify characteristics the the tags may have such as font, color, size, and other traits. Attributes work in different ways, some of which need to be sperated using semi-colons ( ; ), and others that do not. Attributes are always set equal to something and the specific attribute is always in double quotation marks. These attribute tags do not need to be closed.

    <tag attribute> information inside of tag </tag>

    <body bgcolor = "black">Whatever I want to write in my body </body>