CSS
CSS stands for Cascading Style Sheet.
There are Different Ways to add css to a block
-
Inline Css
- To use Inline CSS, you have to use the style attribute in the tag you want to add styling to.
-
Link to External File
- To link to an external CSS file you have to use the link tag and rel attribute set to stylesheet href attribute to refer to the .css file that has all the styles.
-
Using the Style tag
- You can also add styles to an element using the style tag under the head tag. All the styles are added inside the style tag.
There are 3 ways to reference to an element/ point to which element need to be styled.
- Calling using the tag name.
- Tag names can be directly called to change their styles. Like if u open the file here. Master CSS, you will find that there are style for the body tag that changes it's color to AliceBlue and some other styling discussed later.
- Referencing using class
- An Element can be referenced using the class atttribute.
- Refrencing using ID
- An element can be referenced using an Id attribute. An Id is unique whereas a class can be used to apply the same styles to different elements.
Click to go the Main page