HTML VS CSS

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

HTML VS CSS

Background color html

<html>
<body style="background-color:powderblue;">
</body>
</html>

Background color CSS


<html>
<head>
<style>
body {background-color: lightblue;}
</style>
</head>
<body>

Font HTML
<html>
<body>
<p style="font-family:courier;"> This is a paragraph, shown in the
courier font</p>
</body>
</html>

Font CSS
<html>
<head>
<style>
p.serif {font-family: "Times New Roman", Times, serif;}
</style>
</head>
<p class="serif">This is a paragraph, shown in the Times New Roman
font.</p>
</body>
</html>

List HTML
<html>
<body>
<ul style="list-style-type:square">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
</body>
</html>

List CSS
<html>
<head>
<style>
ul.b {list-style-type: square;}
</style>
</head>
<body>
<ul class="b">
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ul>
</body>
</html>

You might also like