|
|
|||||||
7 AttributesSome tags are modified by the presence of attributes. Attributes are written inside the opening tag only, following the tag's name. Nothing extra is written in the closing tag. Some tags have required attributes, and will not work without them. With others the attribute is optional. All attributes follow the same pattern of attribute name and its value, written name="value". The value always follows an equals sign and is within quotation marks or said to be "quote enclosed". Again attribute names are lowercase.
Where the attribute name is align and the value of align is in this case center. Names and values.Attributes have several formats. Sometimes the value has a fixed set of options from which to choose. A good example is the paragraph tag with its optional alignment attribute. The default is left, and no attribute is needed, with two choices of center (note the US spelling) and right. Left, center and right are the only three options. In other cases the attribute has a value chosen by the designer. A good example is the card tag. Every card tag has two required attributes, id and name. The id is used to access individual cards via a link. Its value is a unique string (an unbroken series of characters). The title is used for bookmarking purposes and is displayed at the top of the screen by some browsers. The value of the title need not be an unbroken string, and can contain spaces. The convention with unbroken strings is to use underscores if_a_space_is_needed.
|
1
Preparation Type in WAP |
||||||