CSS source elements
regardless of the location of the reference, there are 3 types of CSS elements

1. tag based element

a block can be defined by a name of a HTML tag, and affect all the page

    p {
        font-size: 40px;
    }
    
this will affect all p tags in the html page.

2. class based element

a class can be defined in the CSS block

    .className {
        font-size: 40px;
    }
    
** A class is defined wil a . (dot) prefix
calling a style class:

    
......content
a class can be used for multiple html elements.

2. id based element

An id can be defined in the CSS block

    #idName {
        font-size: 40px;
    }
    
** An id is defined wil a # (pound) prefix
calling a style id:

    
......content
An id is defined to a uniue object

Selectors List

A css selector can be a refernce of multiple html elemens
the references can be nested or filtered
CSS selectors List

css game


back to main page