tags, and emphasized text should be
marked up using tags instead of tags. If you??™re curious about why tags should be
used instead of tags, just think of what italicizing is: it??™s presentational; there??™s no specific
meaning to it. On the other hand, adds emphasis. The same goes for the difference
between and . Simply bolding the text adds no additional meaning to it; if you
want to say something strongly, use .
Semantic markup can also apply to your choice of class names on an element. Using
the look and feel of your error messages. This also becomes more relevant when using DOM
scripting. Searching for something called error makes more sense than looking for something
called boldRed.
CHAPTER 2 n HTML, CSS, AND JAVASCRIPT 15
HTML Best Practices
Although I certainly don??™t preach the following as gospel, I want to cover some of my personal
practices and explain the reasons behind them before moving on.
Pages:
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56