How To Include CSS Inside the HEAD Tag

Q

How To Include CSS Inside the HEAD Tag? - CSS Tutorials - Introduction To CSS Basics

✍: FYIcenter.com

A

If you want to include CSS inside the HEAD tag and apply to the entire HMTL docuemnt, you can use the STYLE tag as <STYLE TYPE="text/css">css_definition</STYLE>. The following tutorial exercise shows you how to set body background to black and paragraph text to yellow:

<html><head>
<title>CSS Included</title>
<style type="text/css">
  BODY {background-color: black}
  P {color: yellow}
</style>
</head><body>
<p>Welcome to FYICenter.com. 
You should see this text in yellow on black background.</p>
</body></html>

2007-05-11, 4555👍, 0💬