HTML CSS: Difference between revisions
Jump to navigation
Jump to search
Bradley Monk (talk | contribs) (Created page with " ==Attributes== === id === HTML <p id="idTag">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...") |
(No difference)
|
Latest revision as of 03:08, 27 July 2017
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).