CSS your HTML partner ! !

CSS your HTML partner! !

Click here to visit Our forum here!

Tuesday, February 22, 2011

Inline Style , Internal Style And External style

Inline style:
We add the styles within our HTML tags. This gets highest priority than Internal and external defined styles. Let us try to add a background style to one h1 tag.




<h4 style="background-color: #f1f1f1;">This is H1 tag</h4>


Internal Style
This type of style is defined inside the body tag of the page. The style defined here get priority over the external styles but before the Inline styles. Here is an example of Internal styles.



<html>
<head>
<title>(Type a title for your page here)</title>
<style type="text/css">
<!--
p {
font-family: verdana, arial, sans-serif;
background-color: #ffff00;
}
-->
</style></head>

<body >


<p> This is content and its style is defined
within the internal style sheet</p>

</body>
</html>


External Style sheets
These styles are kept separately and called or linked from the required page. This is the syntax followed for linking a external style sheet.



<link rel="stylesheet" href="images/style.css" type="text/css">


References:
Inline Style, Internal Style, External Style [Onliine], Retrieved 22/2/2011

No comments:

Post a Comment