Prev | Current Page 32 | Next

Charles Wyke-Smith

"Stylin' with CSS: A Designer's Guide 2nd Edition"

I??™ve always done this myself, but if you haven??™t, the
days of P are over. Now it has to be p.
8. Attributes must have values and must be quoted. Some tags??™
attributes don??™t need values in HTML, but in XHTML, all attributes
must have values. For example, if you previously used
the select tag to create a pop-up menu in an HTML form, and
wanted to have one menu choice selected by default when the
page loaded, you might have written something like this

which would have given you a drop-down menu with Dogs displayed
by default.
The equivalent valid XHTML is this
The use of a as the tag name for
a link comes from the fact that a
link that jumps to another location
within the same page is know as an
anchor. The same tag can be used
to jump to a different page; an a tag
used for this purpose is now universally
referred to as a link. Of course,
there is an XHTML link tag, which
is used to associate a style sheet
with a page, so don??™t get confused
here. Remember, a ???hyperlink??? that
the user clicks to jump to a new
location is technically known as an
anchor and always uses the a tag,
even though everyone refers to this
mechanism as a link.
STYLIN??™ WITH CSS - CHAPTER 1 16

Note that in this revised version, all the tag and attribute names
are in lowercase and all the attribute values are in quotes.


Pages:
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44