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:
- Standard mode
- Quirks mode
- Almost standard mode
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:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Almost Standard Mode
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">