|
You might want the browsers to display content that isn’t the document. For example, a numbered heading. You don’t want to have type the numbers in; you want the browser to generate them automatically. Similarly, you might want to insert the word "Figure" before the caption of a figure, or "Chapter 7" before the seventh chapter title. CSS has properties to allow you to do this but they don’t work yet. And it seems a bit complicated. Well, Microsoftâ Word can’t do it properly yet so why should Internet Explorer. Anyway, you use the content property together with the :before and :after pseudo-elements to define the content that you want to put before or after a tag. Content can be text, pictures, URLs, counters and quotation marks. Use the counter-increment and counter-reset properties with content to automatically generate numbers for chapters, headings and so on. The quotes property sets up different quotation marks for different languages. |
More information Generated content an automatic numbering |