BluePink BluePink
XHost
Servere virtuale de la 20 eur / luna. Servere dedicate de la 100 eur / luna - servicii de administrare si monitorizare incluse. Colocare servere si echipamente de la 75 eur / luna. Pentru detalii accesati site-ul BluePink.

above banner

banner website
under banner
home html css references contact
HOMEspace above menu HTMLCSSREFERENCES CONTACT
head of content;
monitors
under monitor image space
folder icon space between sign and sugestion Lessons

 Syntax and selectors

CSS Syntax

A CSS rule set consists of a selector and a declaration block:
selector{property_name1:value1;
     property_name2:value2;
     property_namen:valuen;}
a declaration is a form of property_name:value

CSS selector

The selector points to the HTML element you would like to style.
The declaration block contains one or a lot of declarations separated by semicolons.
Each declaration includes a property name and a value, separated by a colon.

CSS Selectors

  • CSS selectors permit you to pick out and manipulate HTML element(s).
  • CSS selectors used to find (or select) HTML element supported their id, classes, types, attributes, values of attributes and far a lot of.

The element Selector

The part selector selects parts supported the part name.
You can choose all <p>  elements on a page like this: (all <p> parts are center-aligned, with a red text color)

The id Selector

The id selector uses the id attribute of associate degree hypertext mark-up language tag to seek out the particular part.
An id ought to be distinctive at intervals a page, thus you must use the id selector once you wish to seek out one, distinctive part.
To find a part with a selected id, write a hash character, followed by the id of the part.
Note    Do NOT begin associate degree ID name with a number!

The class Selector

The category selector finds parts with the particular class.
The category selector uses the HTML class attribute.
To find parts with a selected category, write a amount character, followed by the name of the class:

CSS [attribute] Selector

The [attribute] selector is employed to pick out elements with the desired attribute.

CSS [attribute=value] Selector

The [attribute=value] selector is employed to pick out elements with the desired attribute and value.

CSS [attribute~=value] Selector

The [attribute~=value] selector is employed to pick out elements with associate degree attribute value containing a such word.

CSS [attribute|=value] Selector

The [attribute|=value] selector is employed to pick out elements with the desired attribute beginning with the desired value.

CSS [attribute^=value] Selector


The [attribute^=value] selector is employed to pick out elements whose attribute value begins with a such value.

CSS [attribute$=value] Selector


The [attribute$=value] selector is employed to pick out elements whose attribute value ends with a such value.

CSS [attribute*=value] Selector


The [attribute*=value] selector is employed to pick out elements whose attribute value contains a such value.



Biblography

  1. http://www.w3schools.com/css/css_syntax.asp
  2. http://www.w3schools.com/css/css_selectors.asp

Introduction

Syntax and selector

Background

Text style

List

Box model

Floating

Combinators

Pseudo classes

Pseudo element

like hr2
end site bar

Copyright 2014 Florin Bacu | All Rights Reserved

home  contact


under copyright