CSS Selectors: HTML Tag Names

By: Dusty Arlia
Published on February 7, 2013
Last Updated on Tuesday, July 07, 2015 at 12:08 AM
Total Updates: 2

The most common CSS selectors for smaller scale websites are regular HTML tag names, like h1, h2, h3, div, p, span, ul, ol, li, and td. When using an HTML tag name as a CSS selector, you don't need the angle brackets (<...>) or any other special characters like periods (.) with classes and pound signs (#) with identifiers. The HTML tag name alone selects all those elements in a webpage. If you need a single element on a page - use an id. If you need a select group of elements from a webpage - use classes.

Comments:

Ad:

Ad: