Introduction to CSS Flashcards
Every element in a web page is essentially all composed of a …
series of boxes
Inline CSS
CSS attributes that can be placed in the html file to style the page in the form of being in the individual html tag themselves
Internal CSS
Use of the tag inside the
External CSS
Link to the .css file with in the of html file
Anatomy of CSS Syntax
selector { property : value; }
CSS Selectors
Tag Selector
Ex. h1, img, body
Class Selector
Inside HTML, of the html tag include class=” ”
Then in the CSS, select the class by including a . in the front
.class_identifier { property : value; }
ID Selector
Inside HTML, of the html tag, include id=” ”
Then in the CSS, select the id by including a # in the front
#id_identifier { property : value; }
ID vs Class Selectors
ID - use only for a single html tag where you want to modify its style
There can only be one id_identifier for a given html file
Class - use for a group of html tags where you want to have a consistent style for the group
A html tag can have multiple classes