C

Last updated on

The cursor property in CSS controls what the mouse cursor will look like when it is located over the element in which this property is set. Obviously, it only is relevant in browsers/operating systems in which there is a mouse and cursor. They are used essentially for UX – as they convey the idea of

Continue reading →

Last updated on

The counter-reset property allows for automatic numbering of elements. Like an ordered list (<ol>), but it works on any element. It is particularly useful in creating a table of contents or numbering headings for something like a thesis paper. The counters are applied via the content property. A simple example: article { counter-reset: section; }

Continue reading →

Last updated on

Ordered lists aren’t the only elements that can be automatically numbered. Thanks to the various counter-related properties, any element can be. <body> <section></section> <section></section> <section></section> <section></section> </body> body { counter-reset: my-awesome-counter; } section { counter-increment: my-awesome-counter; } section:before { content: counter(my-awesome-counter); } Each <section> will respectively start with “1”, “2”, “3”, or “4”. You can

Continue reading →

Last updated on

The content property in CSS is used in conjunction with the pseudo elements ::before and ::after. It is used to literally insert content. There are four value types it can have. String .name::before { content: “Name: “; } Then an element like this: <div class=”name”>Chris</div> Would render like this: Name: Chris It could also be

Continue reading →