sean2012 Posted January 17, 2013 Share Posted January 17, 2013 Hello, I'm working on a site for school and it is supposed to meet the html 5 strict requirements. I was using an <audio> tag but that does not meet the requirements. So, my question is how do I add background music that will meet the requirements? Thanks. Link to comment Share on other sites More sharing options...
Ingolme Posted January 17, 2013 Share Posted January 17, 2013 The audio element is valid HTML 5, it isn't valid HTML 4.01, are you sure your page has the HTML 5 doctype? Link to comment Share on other sites More sharing options...
sean2012 Posted January 17, 2013 Author Share Posted January 17, 2013 I am pretty sure, but I only started on this last week. This is my Doctype <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> My audio tag <audio src="audio/cloudburn.mp3" controls> and the error message. Errors found while checking this document as XHTML 1.0 Strict!Line 16, Column 89: element "audio" undefinedLine 16, Column 89: "controls" is not a member of a group specified for any attributeLine 16, Column 59: there is no attribute "src" Link to comment Share on other sites More sharing options...
jeffman Posted January 18, 2013 Share Posted January 18, 2013 The HTML5 doctype looks like this: <!DOCTYPE html> Yup. That's all there is. Link to comment Share on other sites More sharing options...
sean2012 Posted January 18, 2013 Author Share Posted January 18, 2013 Yeah I understand that but for the class I am this doctype is required. Any suggestions about the audio tag? Link to comment Share on other sites More sharing options...
thescientist Posted January 18, 2013 Share Posted January 18, 2013 (edited) Yeah I understand that but for the class I am this doctype is required. Any suggestions about the audio tag? Hello, I'm working on a site for school and it is supposed to meet the html 5 strict requirements. I was using an <audio> tag but that does not meet the requirements. So, my question is how do I add background music that will meet the requirements? Thanks. simply, it can't be both then. it's either the HTML5 DTD, or it is another DTD, which won't support the audio tag. Doesn't get much more cut and dry than that. Edited January 18, 2013 by thescientist Link to comment Share on other sites More sharing options...
jeffman Posted January 18, 2013 Share Posted January 18, 2013 Well, someone is confused. You posted an XHTML 1 doctype. Is your teacher calling it an HTML5 doctype? Also, there is no such thing as strict HTML5. Rather, there is only strict, so strict is never specified. Link to comment Share on other sites More sharing options...
sean2012 Posted January 18, 2013 Author Share Posted January 18, 2013 Okay maybe I am just confused. My professor said that we are coding in html 5 but the doctype is xhtml so I will ask him. Link to comment Share on other sites More sharing options...
thescientist Posted January 18, 2013 Share Posted January 18, 2013 http://www.w3schools.com/tags/tag_doctype.asp Link to comment Share on other sites More sharing options...
Ingolme Posted January 18, 2013 Share Posted January 18, 2013 It sounds like your professor is not very knowledgable. XHTML is an old standard which is becoming obsolete. Link to comment Share on other sites More sharing options...
jeffman Posted January 18, 2013 Share Posted January 18, 2013 It sounds like your professor is not very knowledgable. XHTML is an old standard which is becoming obsolete.Time does fly on the Internet. I teach at a community college. I encounter professors and high school teachers all the time who haven't updated their skillset in 5-10 years. Tag names in all caps. Obsolete attributes. Font tags. My school's homepage uses a transitional doctype. It's humiliating. Obviously there are good teachers out there, but you need to watch out. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now