HTML and CSS Reference
In-Depth Information
languages use single characters as quotation marks, you can specify
strings of any length to be used as quotation marks.
You may also want to specify alternative quotation marks based on the
language used. You can use the :lang pseudoelement to associate dif-
ferent quotes properties with different languages. For example:
q:lang(en) { quotes : '"' '"' "'" "'" }
q:lang(no) { quotes : " " " " "<" ">" }
ensures that English and Norwegian documents use their respective
quotation marks. Creating counters
You can create simple numbered lists easily in HTML and XHTML with
the <ol> element. More complex numbered lists, especially nested
numbered lists, are impossible with the markup languages, though. In-
stead, CSS2 provides the notion of a counter whose value can be set
and changed as the browser renders your document. Insert the value of
the counter using special functions recognized by the content property,
and alter the appearance and format of the counter with other CSS2
Every CSS2 counter has a name. To create a counter, simply mention
its name in the counter-reset or counter-increment properties associated
with any element. If an instance of that named counter does not
already exist in the current document nesting level, the CSS2-conscious
browser automatically creates it. Thereafter, set or reset the value of
the counter as needed. For example, suppose we want to use <h1> ele-
ments as chapter headings, with <h2> elements as section headings.
Both chapters and sections are numbered, with section headings being
reset with each new chapter. You can achieve this with:
h1:before { counter-increment : chapter; counter-reset : section }
h2:before { counter-increment : section }
Search WWH ::

Custom Search