Terms used in CSS

4

Knowing that CSS literally means Cascade Style Sheets , I regularly see the term "property" being used to refer to left , width , top , background etc .

Faced with this, I had the following doubt:

Is this referral correct? If yes, then what are the "styles" referred to by the name "Style" in the acronym CSS?

    
asked by anonymous 22.07.2018 / 02:15

1 answer

4

Property is only one component of a style.

CSS can be understood (in a very simplified way) as a simple list of properties / values pairs applied to an HTML element.

This becomes clearer if you think of style in line. Example:

<h1 style="color:blue;text-align:center">Isto é um cabeçalho azul</h1>

Note that the sytle attribute applies a list of property / value pairs on the h1 tag.

left, width, top, background are properties.

You can only consider a style when these properties are applied to an element:

div {
   left:10px;
   width:100px;
   top:5px;
   background-color: lightblue;
}
    
22.07.2018 / 02:55