Hi, Is it necessary to declare type attribute in style tag. <style> </style> or <style type="text/css"> </style>
no.........................it is not necessary to declare ...........any.........attribute but...............if you can declare then it will be beneficial for you ................because some browser recommend it..................
It is required in HTML4.01 Strict and XHTML1.0 Strict doctypes, but I was surprised to see that it's NOT required for HTML5. So, depends on your doctype. I guess they figure no other types are used. However, I have seen somewhere a Javascript type attribute... I'm not sure why. <style type="text/javascript"> some stuff... </style> It might not even have been valid.