O'Reilly logo

Web Design in a Nutshell, 2nd Edition by Jennifer Niederst Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

HTML Tags

Elements in the HTML specification are indicated by tags. An HTML tag is made up of the element name followed by an optional list of attributes, all of which appears between angle brackets (< >). Nothing within the brackets is displayed in the browser. The tag name is generally an abbreviation of the element’s name or the tag’s function (this makes them fairly simple to learn). Attributes are properties that extend or refine the tag’s function.

In the current specification, the name and attributes within a tag are not case sensitive. <BODY BGCOLOR=white> works the same as <body bgcolor=white>. However, values for particular attributes may be case sensitive, particularly URLs and filenames.

Tip

Because tags are not case-sensitive in the HTML 4.01 specification, the tags in sample code throughout this book are written in all uppercase letters for improved readability. In future iterations of HTML (namely XHTML, discussed in Chapter 31), tags and attributes will be required to be all lowercase. While it is recommended that developers begin the good habit of coding in all lowercase immediately, this book follows the conventions for tag display established within the HTML 4.01 specification itself.

Containers

Most HTML elements or components are containers, meaning they have a start tag and an end tag. The text enclosed within the tags follows the tag’s instructions. In the following example, the <I> container tags make the enclosed text italic:

The weather is <I>gorgeous</I> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required