Which HTML version should be chosen for a public website

后端 未结 4 1296
伪装坚强ぢ
伪装坚强ぢ 2021-01-18 18:17

I am currently working on a website. After studying HTML5 and its features I want to go ahead with it. I want to use features like offline storage, data- attribs, simple cha

4条回答
  •  清酒与你
    2021-01-18 19:07

    Unlike other languages, you don't have to choose between HTML 5 and XHTML. I think your question is coming form seeing the DOCTYPE string at the top of HTML source. You should include a DOCTYPE, but it doesn't matter much to browser support.

    The right question to ask is if there is browser support for the features you want to use. Every browser supports some features of HTML 5, since most of HTML 5 is the same as HTML 4 and XHTML. Consider your target audience and what browsers they probably use and then look up how well those browsers support the features you want to use.

    In short, you don't have to decide if you want to use HTML 5, you need to decide individually on a feature-by-feature basis if that feature is well enough supported (no matter if that feature is an HTML 5-specific feature or not).

    This is a good resource for browser support of some of HTML 5's new features: http://www.findmebyip.com/litmus

提交回复
热议问题