HTML and CSS Reference
In-Depth Information
To i n c l u d e To l d v e r s i To n s To f I E , y To u c a n t a k e a d v a n t a g e To f s p e c i fi c -
ity. Defi ne generic header and footer styles, and then redefi ne/
override them for article header and article footer:
header {display:block; color:red; text-align:right;}
¬ /*page header */
article header {color:blue; text-align:center;}
¬ /*article header */
Note that so far, you've introduced no id s or class es as hooks
for CSS.
Using multiple <footer>s on the same element
The spec says “Footers don't necessarily have to appear at the
end of a section, though they usually do,” and it allows an ele-
ment to have two or more footers. A simplifi ed version of the
example in the spec is
<footer><a href=”/”>Back to index...</a></footer>
<h1>Lorem ipsum</h1>
<p>Lorem ipsum</p>
<footer><a href=”/”>Back to index...</a></footer>
The reason for this is that the elements are supposed to be non-
presentational. If “back to index” is the footer below the article,
and you choose to have “back to index” above the article, too,
you should use the same element for the same content, regard-
less of where it appears.
Using <blockquote> <footer>s
Very groovily, <blockquote> can have a footer, which is a very
useful way of citing the source in a way that's unambiguously
associated with the quotation but also nicely presented to your
users (previously, the cite attribute on <blockquote> wasn't
displayed anywhere):
Thou look'st like antichrist, in that lewd hat.
<footer>Ananias <cite>Scene 4.3, <a href=”http://
¬ Alchemist</a></cite> (Ben Jonson)</footer>
Search WWH ::

Custom Search