Three kinds of css placement in HTML.

External css

<head>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
</head>

Internal css

<head>
<style type="text/css">
hr {color:red;}
p {margin-left:20px;}
body {background-image:url("images/backimg.gif");}
</style>
</head>

Inline css

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

References

BACK TO TOP
Post tagged with: html, css