Web/CSS

[CSS] Syntax

llHoYall 2020. 8. 24. 21:52

The basic syntax of CSS is like below.

selector {
  property: value;
}

The selector selects which element of HTML tag.

The CSS block is specified by { }.

The property means which property is applied to the selected tag.

The value means what value is applied to the specified property.

The : has to be located between property and value.

The ; has to be located after the value.

 

This is the example.

div {
  width: 100px;
  height: 200px;
  background-color: tomato;
}
반응형