-1

When trying a test batch of a simple HIT, I discovered that the submit button does not work. I then noticed that when looking at the Layout ID it says that

There was an error parsing the HTML5 data in your hit template.

This was just a quickie HIT that I built by hand based on an existing template, but I figure I must have messed up the HTML somewhere since I was editing it by hand.

When I try to copy/paste the source of my HIT into the W3 validator, the things it complains about are not parts of the template that I touched, and mostly seems to be about the fact that my source is not a complete HTML document because MTurk will be wrapping it:

Warning: Consider adding a lang attribute to the html start tag to declare the language of this document.
Error: Start tag seen without seeing a doctype first. Expected .
Error: Element head is missing a required instance of child element title.
Warning: The type attribute for the style element is not needed and should be omitted.

Is there an easy way to access the full wrapped HTML of the HIT for validation? Or some better way of troubleshooting my HTML.

TylerH
  • 20,799
  • 66
  • 75
  • 101
PurpleVermont
  • 1,179
  • 4
  • 18
  • 46

1 Answers1

1

You're correct that MTurk will wrap the HTML you provide. You can see the boilerplate XML it will add on the documentation for HTMLQuestion. These docs are intended for developers using the API, but it will show you what's happening with your HTML.

That said, it shouldn't matter. Just make valid HTML and you'll be okay. For example, the <title> tag won't be shown when Workers do your task, but leaving it in won't harm anything.

Also, a common mistake is to omit <!DOCTYPE html> on the first line. It's required as part of the HTML spec, but browsers aren't strict about it, so most people don't do it. But MTurk, and the W3 Validator, will both bark at you if you omit it.

Trenton
  • 11,678
  • 10
  • 56
  • 60