Basic and Advance CSS Examples and Concepts Question:
Download Questions PDF

How To Include CSS Inside the HEAD Tag?

Answer:

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 GlobalGuideLine.com.
You should see this text in yellow on black background.</p>
</body></html>


Download Cascading Style Sheet CSS Interview Questions And Answers PDF

Previous QuestionNext Question
How To Include CSS Inside a HTML Tag?How To Store CSS Definitions in External Files?