Main content
Unlisted resources area
Course: Unlisted resources area > Unit 2
Lesson 2: Webpage documentation- HTML: The h1 to h6 tags
- HTML: The p tag
- HTML: The br tag
- HTML: The ul, ol, and li tags
- HTML: The strong and em tags
- HTML: The a tag
- HTML: The image tag
- HTML: The table tags
- CSS: The element selector
- CSS: The descendant selector
- CSS: The class selector
- CSS: The id selector
- CSS: The color property
- CSS: The background-color property
- CSS: The font-family property
- CSS: The font-size property
© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice
CSS: The class selector
The class selector is a way to select all of the elements with the specified class name, and apply styles to each of the matching elements. The selector must start with a period (.) and then the class name. The browser will look for all tags in the page that have a class attribute containing that class name.
The spelling and casing must be exactly the same - ".cold-city" is different from ".Cold-City". The class name can't contain a space, but it can contain hyphens or underscores. Any tag can have multiple space-separated class names.