HTML CSS
Jump to navigation
Jump to search
Attributes
id
HTML
Specific style for a single element. Note: The id of an element should be unique within a page, so the id selector is used to select one unique element!
CSS
- idTag {
color: blue;
}
class ATTRIBUTE ---
HTML
To define a style for a set of elements, add a class attribute to the element
CSS p.classTag {
color: red;
}
A block-level element always starts on a new line and takes up the full width available (stretches out to the left and right as far as it can).