CSS is stands for Cascading Style Sheets, and it controls what the content of the site looks like.
The key to understand how CSS works is to imagine that there is an invisible boc around every HTML element.
CSS allows you to create rules that control the way that each individual boc and its content is presented.
A CSS rule contains two parts: a selector and a declaration.
/*
p is the selector
font-family: Arial is the declaration
*/
p {
font-family: Arial
}
/*
This rule indicates that all <p> elements should be shown in the Arial typeface.
Selectors indicates which element the rule applies to. The same rule can apply tomore than one elements if you seperate the elements name with the commas.
Declarations indicates how the elements referred to in the selector should be styled.
*/
CSS declarations sit inside curly brackets and each is made up of two parts: a property and a value, seperated by a colon.
Leave a Reply