CSS Basics Syntax

Learn CSS Basics Syntax:

Let us first understand a few basics of Cascading style sheets abreviated as CSS. A CSS style is something similar to the image below: 

CSS properties illustrated
  • {align:right;} or
  • {color:orange;}

CSS Comment Tags: 

Like the styling of CSS properties above, CSS does have its own comment tags. Every CSS comment can be encoded as:

/* This is a CSS comment */ or

// This is a CSS comment

The difference between the two comments is that the second one is meant for a single line while the first one is meant for the entire text that goes inside the comment tags. 

CSS Selectors

CSS selectors are either the default selectors or the ones we create in the form of classes, divs and others. Let us see the example below:

h1{color:orange; font:arial;}

Well, from above example we can understand what CSS selectors are meant for. Similarly, we do need to wrap the content of our web pages’inside divs or simply put the blocks of text or images. These divs or blocks are associated with CSS properties to give them a different look and position. For example the website http://www.risenotes.com has put its links insdie boxes on the home page. These boxes are the actually different divs that are made to look different just because of the CSS properties asscociated with them. 

style boxes risenotes