Jump to content

Question about page on W3Schools Website


Recommended Posts

Hey guys!I am learning about the new HTML5 doctype but am confused over several points.

<menu>   <!-- Doesn't show anything on screen -->   <command label="Something" />   <!-- Doesn't validate with HTML5 and doesn't work in Chrome (seems to work in FF and IE) -->   <command>Something</command>   <!-- IE7 doesn't like this: -->   <hr role="separator" /></menu>

I have been referring to the following page (the "Try it yourself" doesn't seem to work either):http://www.w3schools.com/html5/tag_command.asp- How are menus and commands supposed to be implemented so that they work in all browsers?- How would you add a separator as IE7 doesn't like the HR?- What is the best practice to using these new features of HTML5?So at the moment I have resorted to using the following:

<div role="menu">	<div role="menuitem">Something</div></div>

Many thanks,

Link to comment
Share on other sites

the first thing to consider is whether or not a browser your testing with supports any of the new features. Considering HTML5 is still being refined and developed, it goes without saying that certain features will be hit or miss until it's completed, and then even then it will take some time for it's adoption to be implemented in all browsers. Best practice would be to know your audience, and don't rely on anything until you know it's fully supported in all the major browsers for anything "mission critical" to your sites performance and usability.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...