Categories

CSS rule

Daniel Morales April 16, 2015
No votes yet.
Please wait...

CSS rule is a statement that tells browsers how to render particular elements on an HTML page. It is a single section of CSS including the selector, the curly braces, and the different lines with properties and values. For example:

p { 
	color: #000; font-size: 20px;
}
glossary_css_rule_1

CSS rule consists of a selector followed by a declaration block:

glossary_css_rule_2

Selector

Selector points to the HTML element you want to style. It consists of everything up to the first left curly bracket.

Declaration block

Declaration block is the container that consists of one or more declarations separated by semicolons. Declaration groups are surrounded by curly braces. Each declaration block includes a property name and a value, separated by a colon:

glossary_css_rule_3

Property

Property is an aspect of that element that you are choosing to style. There can only be one property within each declaration.

Value

Value is the exact style you wish to set for the property.

Bookmarken den permalink.

Submit a ticket

Sollte Ihre Frage durch die Tutorials nicht ausreichend beantwortet worden sein, benutzen Sie bitte den folgenden Link, um sich an unser Beratungsteam (Support) zu wenden. Wir bieten Ihnen unsere Hilfe und Unterstutzung an. 24 Stunden am Tag, 7 Tage die Woche!
Ticket Einrichten

Kommentare sind geschlossen