KnowledgeBoat Logo
|

Computer Applications

Namrata has written some style rules using the embedded style sheet method, but the effects are not getting applied on the elements. Instead the rules are getting displayed as such on the screen. What can be the possible reason? Suggest her some solution for the same.

CSS

18 Likes

Answer

One of the possible reasons for such a problem can be browser compatibility. Namrata may be using an older browser which doesn't support CSS.

Two ways in which the problem can be fixed are as follows:

  1. Namrata can switch to a browser which supports CSS.
  2. She should wrap the style sheet code within HTML comments:
<HTML>
<HEAD>
<TITLE> Embedding Style Sheets</TITLE>
<STYLE Type = "text/css">
<!--
...
style rules
...
-->
</STYLE>
</HEAD>
</HTML>

Answered By

8 Likes


Related Questions