Including CSS with the HTML Tag

Explain how to include the CSS within the HTML Tag?

E

Expert

Verified

If you wish to include the CSS within the HTML tag, you may use STYLE attribute as <TAG STYLE="css_definition" ...>. Of course, CSS definition will only applied to this instance of this tag. The following code will set background to gray on a <PRE> tag:

<p>Map of commonly used colors:</p>

<pre style="background-color: gray">

black #000000

white #ffffff

gray #7f7f7f

red #ff0000

green #00ff00

blue #0000ff

</pre>

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.