CSS Selectors
CSS selectors determine which elements on a web page should be styled. Some common selectors include:
Element Selector: Targets elements by their tag name. For example:
p {
color: blue;
}
Class Selector: Targets elements with a specific class attribute. For example:
.highlight {
background-color: yellow;
}
ID Selector: Targets a specific element with a unique ID attribute. For example:
#logo {
width: 200px;
}
No comments:
Post a Comment