Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm currently writing a plugin that displays some images - possibly with captions. So, I was wondering whether to use XHTML (<div>s and <span>s) or HTML 5 (<figure> and <figurecaption>) for output.

I image that the answer to this question depends somewhat on the theme being used. Is there a way to figure out which output format the user's theme is using? Or what's the best approach here? What's Wordpress doing to solve this issue?

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

WordPress will not help you here. In back-end use conservative XHTML 5: <br />, but not <figure> (see WP coding standards).

In front-end … it is hard to determine the Doctype and the usage of polyfills, so stay with regular HTML as long as possible or load the necessary polyfills from your plugin.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.