Prev | Current Page 436 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"

For the record, I prefer
lowerCamelCase, but there??™s no reason for choosing a particular case.
Not closing elements, attributes, and rules: An unclosed element in HTML may
cause the remainder of the web page (or part of it) to not display correctly.
Similarly, not closing an HTML attribute makes all of the page??™s content until the
next double quote part of the attribute. Not closing a CSS rule may cause part or
all of the style sheet to not work. Note that CSS pairs that aren??™t terminated with a
semicolon may cause subsequent rules to partially or wholly fail. A good tip to
avoid accidentally not closing elements or rules is to add the end tag/closing
bracket immediately after adding the start tag/opening bracket. This also helps to
avoid incorrect nesting of elements.
Multiple rule sets: In CSS, ensure that if you use a selector more than once, any
overrides are intentional. It??™s a common error for a designer to duplicate a rule set
and have different CSS property values conflicting in different areas of the CSS.
Errors with the head and body elements: As stated earlier in the book, HTML content
should not appear outside of the html element, and body content should not
appear outside of the body element. Common errors with these elements include
placing content between the closing head element tag () and the body start
tag (), and including multiple html and body elements.
Inaccessible content: Here, we??™re talking in a more general sense, rather than about
accessibility for screen reader users.


Pages:
424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448