Answer Posted / thoms
As sekar said css is broadly classified into following 3 types:
External Style Sheet:
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 <link> tag. The <link> tag goes inside the head section:
<head>
<link rel="stylesheet" type="text/css"
href="mystyle.css" />
</head>
Internal Style Sheet:
An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section by using the <style> tag, like this:
<head>
<style type="text/css">
hr {color: sienna}
p {margin-left: 20px}
body {background-image: url("images/back40.gif")}
</style>
</head>
Inline Styles:
An inline style loses many of the advantages of style sheets by mixing content with presentation. Use this method sparingly, such as when a style is to be applied to a single occurrence of an element.
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>
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are the differences between PHP3 and PHP4 and PHP5? what is the current stable version of PHP?
How you can update memcached when you make changes to php?
Explain me what is the importance of "method" attribute in a html form?
What is php array function?
Can php run without server?
What are the different errors in php?
Explain the difference between unlink() and unset()?
What is different types of visibility?
What is sql injection in php?
What is difference between base_url and site_url?
What is meant by public, private, protected, static and final scopes?
Which php framework is best for beginners?
What are the ways to include file in php?
What is Apache's configuration file typically called?
How can I use single quotes in single quotes in php?