The following question was asked on public-rdfa mailing list:

Is it possible to use html5 doctype with rdfa being able to use xhtml style syntax and staying in strict mode?

asked 05 Jul '10, 22:11

karlcow's gravatar image

accept rate: 50%

closed 16 Mar '14, 15:51

Jeen%20Broekstra's gravatar image

Jeen Broekstra ♦

done. I moved the answer.

(06 Jul '10, 03:54) karlcow karlcow's gravatar image

Thanks, much better!

(06 Jul '10, 06:39) cygri ♦ cygri's gravatar image

The question has been closed for the following reason "The question is answered" by Jeen Broekstra 16 Mar '14, 15:51

The answer is yes. I'm copying the answer I gave on public-rdfa mailing-list so it will be accessible for others in the future here.

Strict Mode

<!DOCTYPE html> 

will put your browser into strict mode.

Proposed syntax for adding RDFa

Be careful it is still a working draft at the time of this writing: RDFa in HTML

<!DOCTYPE html>
<html version="HTML+RDFa 1.1" lang="en">
    <title>Example Document</title>
    <p>Moved to <a href="http://example.org/">example.org</a>.</p>

Syntax Style (aka pseudo-xhtml)

You can write mostly with xhtml syntax style without issues. But be aware that your document will not be necessary xhtml mime-type ready. So basically, you can in html5

  • close your elements ex: <br/>
  • quote your attributes values ex: <span title="html5 is flexible">html5<span>

There is a document, HTML Polyglot, explaining the syntax if you want to serve documents using both text/html and application/xhtml+xml Be careful it is a working draft

permanent link

answered 06 Jul '10, 03:53

karlcow's gravatar image

accept rate: 50%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 05 Jul '10, 22:11

question was seen: 14,693 times

last updated: 16 Mar '14, 15:51