HTML CSS

From bradwiki
Revision as of 02:08, 27 July 2017 by 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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

  1. 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).