CSS is an acronym for Cascading Style Sheets, which is a language used to find and reformat elements created by markup languages ​​(such as HTML).

What is CSS?

You can easily understand that, if HTML plays a role in formatting elements on the website such as creating paragraphs, headings, tables ... then CSS will help us to add a little "style". on those HTML elements like changing page colors, changing font colors, changing structures ... a lot.
What is CSS

CSS plays an additional role in decorating text written in HTML.
The way CSS works is that it will search based on selections, the selection can be an HTML tag name, an ID name, class or more. Then it will apply the properties that need to be changed to that selection.

Structure a piece of CSS

A CSS snippet includes sections like this:
selection {ù ng ch o n {
   attribute: value;o c t í nh : gi á p i;
   attribute: value;o c t í nh : gi á p i;
This means that it will be declared by selection, then the properties and values ​​will be inside curly braces {}. Each attribute will always have a unique value, the value can be numeric, or value names in the list of available CSS. The value and attribute section must be separated by a colon, and each attribute declaration line will always have a semicolon at the end. A selection can use unlimited attributes.
About the list of CSS properties you can look at the CSS Reference of Mozilla .
 Source: Thạch Phạm Blog .
Related Posts

Related Posts

Post a Comment