Friday, 22 April 2011

Embedded CSS

Embedded CSS specifies the CSS properties within the "head" tag of your "HTML" code using a "<style>" block.

Please note within the style block there is a comment "<!-- -->" tag. The comment is there to stop older/ancient browsers that do not support CSS from reading the code and outputting it in the browser. The majority of such browsers are outdated and are no-longer used today, so meaning that it is most probably safe to ignore the use of the comment tag.

Each specification or elements specification is written on a new line, as in our example with the "body" and "p" tags.

Example:

HTML CODE:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="EN" dir="ltr">
<head>
<title>Embedded CSS Styles</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
body{color:#FFFFFF; background-color:#000000;}
p{font-family:Verdana, Arial, Helvetica, sans-serif;}
-->
</style>
</head>
<body>
</body>
</html>

Website Design | Website Design Company | Web Development
Get a beautiful website design. Studio Web is a results oriented web design & online marketing firm serving companies worldwide.
Sponsored Link

No comments:

Post a Comment