Including CSS with the HEAD Tag

Describe how to include the CSS within the HEAD Tag?

E

Expert

Verified

If you wish to involve a CSS within the HEAD tag and apply to whole HMTL docuemnt, you may use STYLE tag as <STYLE TYPE="text/css">css_definition</STYLE>. The following code will set the 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 questions-interviews.com.
You should see this text in yellow on black background.</p>
</body></html>

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.