Cascading Style Sheets (CSS) is a simple design language released
in 1996, CSS describes how HTML elements are to be displayed on screen, paper,
or in other media.
CSS3 version introduced new features that allowed
developers to style HTML elements with less CSS code.
Easy to use
CSS3 allows developers to style HTML elements easier.
CSS3 is the latest version, hence it supports responsive
One of the CSS3 new features is the box-shadow property
that adds a shadow to an element. Instead of using multiple images around an
item, this property lets you add shadow with a short line of code.
Separate reusable modules
CSS3 can be breakdown into modules.
CSS3 also introduced new selectors in addition to the ones
in CSS2. Instead of applying IDs or classes for styling, developers can select
HTML elements according to their attributes.
Performance and speed
CSS3 is faster than basic CSS.
Animation and 3D transformations are supported
CSS3 is backwards-compatible with former CSS versions. It
means that CSS3 features work on web pages using older CSS. Browsers that
support CSS2 also represent the modifications with CSS3..
CSS3 supports HSL RGBA, HSLA and the gradient colors. i.e.
CSS3 provide codes for setting rounded gradients and
Text shadow and effects
CSS3 has many advance features like text shadows, visual
effects, and a wide range of font style and color.
One of the CSS3 properties called opacity makes elements
see-through or completely transparent.
Following CSS text formatting properties are used to set
color and direction of text
Text-color property is used to set the color of the text.
/*color hex value(white)*/
/*color name value(green)*/
Text direction property is used to set the direction of the
Following are text direction CSS values
Ltr :Text direction goes from
left-to-right, this is default value.
Rtl :Text direction goes from
Initial:Sets this property to its
default value. Read about initial
Inherit: Inherits this property
from its parent element. Read about inherit
/*Set the text direction to "right-to-left":*/
Following CSS text formatting properties are used to Indent
the text of html element and align the text of document.
Text indentation property
Text indentation property is used to indent the first line
of the paragraph.
Note: The size can be in px, cm, percentage
Code example for text inside paragraph and div
Text alignment property
Text alignment property is used to set the horizontal
alignment of the text.
These CSS values can be used to set Left, right, left,
right, centered, and justified alignment.
text-align: alignment type;
/*Text alignment centered for button element*/
/*Text alignment left for main content section*/