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 id selector
The id selector is a way to select only the element with the specified id, and apply styles to that element. The selector must start with a pound sign (#) and then the value of the id attribute. The browser will then look for a tag in the page that has an id attribute equal to that id.
The spelling and the casing must be exactly the same - "#sun-descrip" is different from "#Sun-Descrip". The page should not have multiple tags with the same id- every id should be unique.