top

Doctype configuration

Published 2014-10-27 | (Compatible with SDK 2.5,3.5,4.5,5.0,5.1 and 2011,2012,2013,2014 models)

Why it is important to set the doctype for your html files

When the browser displays a webpage, it can use different rendering processes. There are three main render modes that browsers can work in:

  1. Standard mode
  2. Quirks mode
  3. Almost standard mode

Note

More information about browser render modes can be found in the W3C page .

If you don’t include the doctype declaration in your webpage, the 2011 or higher Samsung TV browser will process it in the Quirks Mode. At present, the Quirks Mode is left in the modern browsers for compatibility with old webpages and it is recommended to use the Standard Mode whenever possible. This recommendation applies also to SmartTV Apps.

It is also not recommended to use XML declaration or XHTML DTD because they may not be recognized properly by the platform browser.

For the Samsung TV browsers, you can use the doctype declaration like below:

  1. Standard Mode

    <!DOCTYPE HTML>
    
  2. Quirks Mode

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    
  3. Almost Standard Mode

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">