Coding Error won't validate in W3C...

User 2826919 Photo


Registered User
53 posts

https://validator.w3.org/nu/?showsource … ex-new.php


Error: Element style is missing required attribute scoped.

From line 228, column 48; to line 228, column 54

ziplocal"><style>.embed

Attributes for element style:
Global attributes
media — Applicable media
type — Type of embedded resource
scoped — Whether the styles apply to the entire document or just the parent subtree
Also, the title attribute has special semantics on this element: Alternative style sheet set name.

I have been reading for a while and haven't found a definitive explanation on the proper fix. Comments?
Blissfully Ignorant In Jacksonville, Florida
When all else fails read the instructions.
www.website-design-jacksonville.com
RSD 5.0 what a pleasant surprise. Fantastic!
User 1948478 Photo


Senior Advisor
1,850 posts

When formulated the way you have it (i.e. without the 'scoped' attribute), the <style> tag must be placed in the <head> section of your markup.
http://www.w3schools.com/tags/tag_style.asp
User 2826919 Photo


Registered User
53 posts

My thanks that is what I needed to do.
Blissfully Ignorant In Jacksonville, Florida
When all else fails read the instructions.
www.website-design-jacksonville.com
RSD 5.0 what a pleasant surprise. Fantastic!

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.