Jun 3, 2015

CSS Overview

CSS - Cascading Style Sheet is the web technology created to set how the HTML elements should be displayed. Here you can see an overview about the basics of CSS.

CSS was added in the HTML 4.0 (1997) version, the latest version of HTML is 5 (2014) and CSS is 3. But the CSS 3 is retro-compatible with CSS version 1 and 2, so you can still learning about the old CSS, because it's not obsolete, the version 3 just add new things.

CSS like HTML works with the concept of 'tag', 'element', 'property' and 'value'. The 'tag' and 'element' concepts are commonly mistaken, so to clarify, 'tag' is just the start and end delimiter of an element, and element is the whole thing: tag + content, for example:

    h1 { 
      margin-left: 20px;
      color: blue;

The example above show us how place CSS code in the HTML file using the 'style' tag, that changes the color and margin left of every text written within the HTML element 'h1'. But the CSS code can be placed in other ways too, here you can see how.

Furthermore, as we can see, to change the HTML element property, first you need get/find it, and this can be done using what is called of 'selector', which can get an HTML element by its id, class, name or a combination of them, and here you can see how.

A full list of CSS properties can be found here.

0 comentários :

Post a Comment