Thursday, March 3, 2011

What is embedded style?

An embedded style controls the appearance of a single document. CSS rule(s) are placed in the head of the document via the style element. Embedded styles can be really helpful when you are first learning to code CSS, because it is very easy to edit and troubleshoot the code. Similar to inline styles, embedded CSS defeats the purpose of separating content and presentation. An embedded style sheet can be useful when a single document has a unique style. If the same style sheet is used in multiple documents, then an external style sheet would be more appropriate. Embedded styles are sometimes referred to as internal styles

for example:
Place the following code between the <head>...</head> tags of your HTML document:


<style type="text/css" media=screen>
<!--
p {font-family: georgia, serif; font-size: x-small;}
hr {color: #ff9900; height: 1px }
a:hover {color: #ff0000; text-decoration: none}
-->
</style>

No comments:

Post a Comment