Doctype Declarations in Samsung Smart TV

Samsung Smart TV

Samsung Smart TV applications are normal web applications that use the commonly used web technologies and run in a browser environment inside the TV. To be more simple to this approach, we can say that, Smart TV applications are nothing but HTML rendered in a browser environment. The rendering rules that applies to a normal browser environment also applies to the applications that run in a TV. The browser environment uses various rendering modes to display the current HTML output to the screen.

Browsers support the following rendering modes to render the HTML content to the screen.

  • Standard Mode
  • Quirks Mode
  • Almost Standard Mode



The Standard Mode is the rendering mode that uses all the latest web technologies during rendering. For Samsung Smart TV models after 2011, the content is displayed using the Quirks rendering mode. The Quirks rendering mode exists in modern browsers to provide compatibility to older HTML standards. Also we cannot include the older XML and DHTML declarations when developing applications for current Smart TV models. This will cause huge inconsistencies to the application under development.

While developing applications for Samsung Smart TV’s try to stick with the Standard rendering mode. This will provide all the latest web technologies, and also provides better stability and performance. The rendering mode of the current HTML page is indicated by a single line of code at the beginning called Document Type Declaration (DTD). The browser when parsing the page contents will search for this line and will set the rendering mode accordingly. The Document Type Declaration (DTD) is almost found in all the HTML pages in both the normal web applications and the TV. This line of code differs for each of the versions of HTML and as well as the rendering modes.

The following are the list of the Document Type Declaration (DTD) used for various types of rendering in the browser environment.

Quirks Mode

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">



Standards Mode

<!DOCTYPE HTML>

Almost Standard Mode

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

These DTDs should be the first line of the HTML page that is to be displayed on the screen. The rendering mode is selected based on the given DTD on the first line.

The developer should make sure that the appropriate DTD is given for correct rendering of the contents. This will make the development task a bit easier for the developer and helps in saving a lot of time finding and fixing unknown bugs because of the standards issue.




No Comments


You can leave the first : )



Leave a Reply

Your email address will not be published. Required fields are marked *