CHAPTER 4. HTML TAGS AND ATTRIBUTES 47
Because the legal ID characters are so limited, it is true that you never need
to put quote marks around an ID value.
4.4.3 class=
class=specifies the class of the item. Example,class=highlight. Like
id, class can be used by CSS and JavaScript to control style and actions or
animations relating to items that share that same class. Unlike id, the same
class can be used on more than one item. If you have more than one class,
separate them by spaces and enclose the list in quote marks.
4.4.4 title=
title=specifies text that will be displayed if the user hovers their mouse
over the element for a second or so. Example,title='more information'.
It is a good way to provide hints or extra information that would otherwise
clutter the screen.
I personally think that “title” is really a horrible name for this attribute
because we already have something else called title. The whole document has
a title which is specified in the head with the syntax
and which is typically displayed in the tab of the browser. The two titles
are totally different.
I think a better name would be “popup” but for historical reasons it is called
title. This new thing called title can apply to any portion of a webpage.
Exam Question 89(p.341):What does the
Acceptable Answer:gives a name to the whole webpage
Exam Question 90(p.341):What does the “title=” attribute do?
Acceptable Answer:provides information that is invisible until the user
hovers over it
4.4.5 hidden= (Advanced)
hidden=specifies that the item will not be rendered. It is invisible and
takes up no space.
It may be most useful in connection with JavaScript that can remove the
hidden attribute when you want to make something appear.