IN THIS CHAPTER
Basic Tag Attribute Format
Text and Comments
Uniform Resource Indicators
Language and International Options
In the previous chapter you learned what markup language is and how it relates to HTML and the Web. Expanding on these basics, you can add attributes to your HTML tags to further control their effect on your documents.
Most HTML tags support one or more attributes. These attributes are included in the opening tag using a standard format, as follows:
For example, the
border attribute is used with the
<table> tag to control the width of the border in and around a table in the document. The border attribute resembles the following when actually included in the
Pay close attention to the following rules regarding attributes:
Any attributes in an HTML tag need to appear after the HTML tag name.
The attribute name must be followed immediately by an equal sign (=).
The attribute value needs to come immediately after the equal sign.
The attribute value must always be enclosed in quotes, either single or double.
In previous versions of HTML, some attributes—namely, those with default values—did not need to have a value associated with them. However, in HTML all attributes must have a value included inside the tag with their declaration. In short, you should always provide a value with tag attributes.
Several different types of values can be ...