Interview Question     &Answer
Main Menu
CSS Tutorial@ Shwetank
Defination-  CSS (Cascading Style Sheet) . It is used to change html element style.
Three Ways to Insert CSS
External style sheet
Internal style sheet
Inline style

1 - External CSS-
An external style sheet is ideal when the style is applied to many pages. With an external style sheet, you can change the look of an entire Web site by changing one file. Each page must link to the style sheet using the tag. The tag goes inside the head section

<link rel="stylesheet" type="text/css" href="mystyle.css" />
2- Internal CSS
An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section of an HTML page, by using the ,<style> tag, like this

style type="text/css">
hr {color:sienna;}
p {margin-left:20px;}
Inline CSS
To use inline styles you use the style attribute in the relevant tag. The style attribute can contain any CSS property. The example shows how to change the color and the left margin of a paragraph

<p style="color:sienna;margin-left:20px">This is a paragraph.</p>

Syntax <div> </div>
The <div> tag defines a division or a section in an HTML document.
The <div>tag is often used to group block-elements to format them with styles.

CSS Id and Class
The id selector is used to specify a style for a single, unique element.
The id selector uses the id attribute of the HTML element, and is defined with a "#".
CSS Class
This allows you to set a particular style for many HTML elements with the same class.
The class selector uses the HTML class attribute, and is defined with a "."

IT  Projects Links
M-Tech Thesis
Php Project
Java Project
Asp.Net Project
Android Project
Vb .Net Project
Html Project

------------------------------- Electronics  Project
Embedded system
------------------------------- Latest IT  News

Copyright 2010-2015
Privacy & Terms