0
A student wrote the following code to change the text style of a paragraph. But the text color remains black in IE browser. Why?
The code. <style type="css/text"> P { color: red; font-size: 200%; } </style> Options: 1) Browser settings do not allow connecting global styles 2) The style is defined for the <p> tag, but it should be for the <body> 3) Error in style property 4) Invalid type attribute value 5) Document has no <!DOCTYPE> set
3 Answers
+ 2
If this is a community challenge, you need to ask in your Community Feed. The Q&A section is for help that is needed, not challenges.
+ 1
no 4.Invalid type attribute value
The type attribute of the <style> tag should be set to "text/css" instead of "css/text" to indicate that the contents of the tag are CSS styles.
The correct code should be:
Copy code
<style type="text/css">
p { color: red; font-size: 200%; }
</style>
This way the browser will be able to understand that the styles are written in CSS and will apply them accordingly.
0
IE in 2023 đ¤đ¤đ¤đ¤