代码之家  ›  专栏  ›  技术社区  ›  PurpleVermont

机械土耳其人解析HTML5失败-如何最好地检查它?

  •  0
  • PurpleVermont  · 技术社区  · 6 年前

    当尝试一个简单的点击测试批时,我发现提交按钮不起作用。然后我注意到在查看布局ID时,它显示 There was an error parsing the HTML5 data in your hit template.

    当我试图将命中的源代码复制/粘贴到W3验证器中时,它所抱怨的并不是我所接触到的模板的一部分,主要是因为我的源代码不是一个完整的HTML文档,因为MTurk将包装它:

    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 <!DOCTYPE html>.
    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.
    

    1 回复  |  直到 6 年前
        1
  •  1
  •   Trenton    6 年前

    MTurk将包装您提供的HTML是正确的。您可以看到它将添加到文档中的模板XML HTMLQuestion. 这些文档是为使用API的开发人员准备的,但是它将向您展示HTML的情况。

    <title> 标签不会在工作人员执行任务时显示,但保留它不会损害任何东西。

    <!DOCTYPE html>