CSS



Totel:22 Click: 1 2 3 4 5
CSS Interview Questions And Answers

Page 1

 CSS is stands for Cascading Style Sheets.Where as style is used to show how HTML elements looks like.We use style with in the Style Sheets.We use style in HTML 4.We stored External Style Sheets in CSS. 

Syntax:

selector {property: value}

I have given a basic syntax of CSS.

selector {property: value}

CSS Syntax consist of three parts.These are: Selector,their property and value.

Selector is not other than HTML tags or element.We seperate property with their value by an colon(:) which is surrounded by curly braces.

Example:

body {color: red}

Using above we set the body color red.

 If we want to write mutiple words.Than we can write those with in the double quotes(").

p {font-family: "Rajesh Kumar"}

You can also use the more than one property togather by  only seperated with semicolon(;).

p {text-align:left;color:yellow;font-family: arial}

         'OR'

p

{

text-align: center;

color: black;

font-family: arial

}

Grouping means that we can combine more than one selector like group.These selector are separated with comma(,). I have given you a example how to group the selector.


Example:

h1,h2,h3,h4

{

   color: red

}

 Using class Selector we can set the  different style for same type HTML element.Below, I have shown three paragraphs.Where each paragraph have different align.

Example:

p.right {text-align: right}

p.center {text-align: center}

p.left {text-align: left}

 Now,I tell you how to use them,

<p class="right">

This paragraph is right-aligned.

</p>

<p class="center">

This paragraph is center-aligned.

</p>

<p class="left">

This paragraph is left-aligned.

</p>

Using id selector we can set the style for HTML elements.We set id selector as #.

Below,I have shows you how to use id selector.

#green {color: yellow}

Where, yellow is called as value of an id attribute.


Goto Page:

1 2 3 4 5
CSS Objective Questions And Answers

CSS Objective Questions And Answers

CSS Interview Questions And Answers

CSS Interview Questions And Answers


R4R,CSS Objective fresher and experienced, CSS Subjective fresher and experienced ,CSS Interview Questions And Answers,CSS fresher and experienced,CSS Interview fresher and experienced ,CSS Questions fresher and experienced,CSS Answers fresher and experienced