Possible Duplicate:
Does <STYLE> have to be in the <HEAD> of an HTML document?
I am part of a team that has developed a CMS system.
We would like to be able to insert <style>
tags within the <body>
of an HTML page in a way that validates to W3C standards, as validation is a requirement of our SEO consultant.
The style tag functions perfectly well within the body tag across all browsers, yet it refuses to validate.
The <style> element must be included inside the <head> of the document. In general, it is better to put your styles in external stylesheets and apply them using <link> elements.
W3C validation is the process of checking a website's code to determine if it follows the formatting standards. If you fail to validate your website's pages based on W3C standards, your website will most likely suffer from errors or poor traffic owing to poor formatting and readability.
HTML <style> tag When writing in HTML, the <style> tag is used to change the appearance and position of various elements on a web page. It is placed in the document's <head> and implemented as a class, or used for applying inline CSS to a single element.
A fatal error is any error that causes a program to abort.
The HMTL DTD does not allow it, therefore it doesn't validate. Doesn't matter, all browsers support it anyway.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With