To target an HTML element by id in CSS,
use only the id of the element
add a period before the id of the element
add a hashtag before the id of the element
add a percent sign before the id of the element
To target an HTML element by class in CSS,
use only the class name of the element
add a period before the class name of the element
add a hashtag before the class name of the element
add a percent sign before the class name of the element
To target an HTML element in CSS,
use only the name of the element
add a period before the name of the element
add a hashtag before the name of the element
add a percent sign before the name of the element
To add styles to multiple targets, separate each target with a
space
comma
semicolon
hashtag
To add styles to a target within another target, separate the targets with a
space
comma
semicolon
hashtag