xxxxxxxxxx
<html>
<body>
<!-- BODY HTML -->
</body>
<head>
<!-- HEAD HTML -->
</head>
<style>
/* CSS */
</style>
xxxxxxxxxx
<!-- style inside of an html element -->
<p style="color: rgb(255, 0, 255);">I am a unicorn</p>
<!-- style as an html element -->
<style>
/* Put in CSS */
</style>
xxxxxxxxxx
<html>
<head>
<style>
h1 {color:red;}
p {color:blue;}
</style>
</head>
<body>
<h1>A heading</h1>
<p>A paragraph.</p>
</body>
HTML Styles
xxxxxxxxxx
<!DOCTYPE html>
<html>
<body>
<p>I am normal</p>
<p style="color:red;">I am red</p>
<p style="color:blue;">I am blue</p>
<p style="font-size:50px;">I am big</p>
</body>
</html>
xxxxxxxxxx
<!DOCTYPE html>
<html>
<head>
<!-- Style tag will go inside "head" element, not "body" -->
<style>
.classExample {
color: blue;
font-size: 20px;
text-align: center;
}
p {
font-family: geneva, 'sans-serif';
}
</style>
</head>
<body>
<div class="classExample">I am a styled element!
<p>Lorem ipsum dolor sit amet, consectetur adipiscing.</p>
</div>
</body>
</html>