Could anything such as DTD be used to create the new elements on older browsers sans javascript?
idea is that html5 browsers with an html5 DOCTYPE would ignore the subsquent xhtml declaration with the ‘recreated’ html5 tags, and hence css would be applied.
i’m asking here before testing because i’m on the road and without a machine with old browsers, but too exited to not know if it’s correct or not.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://example.com/xhtml_plus_html5_tags.dtd">
The shiv was designed in JS. other than that, you can’t. (if there were any methods besides using JS, it would have been more used than shiv) also, the html5 doctype cannot be distinguished since it has only
<!DOCTYPE html>and no DTDhowever, you can use generic elements like
<div>and others to do the job for you. also, there is an article which talks about fallback methods in case the browser does not support HTML5