Wednesday, December 19, 2012

<doctype> tag defines document type used for definition of document.

<!doctype html public "-or +//organizationname//dtd used//language" "optional url where dtd is found">
public/system: indicates a publicly available dtd and system key word indicates a system /local dtd.
- or + : indicated whether the organization is registered with ISO
language: en etc.
organization name:w3c

<!doctype html SYSTEM "about:legacy-compat"> to some dtd definer.

Some god script :p .. :)


var node = document.doctype;
var html = "<!DOCTYPE "
         + node.name
         + (node.publicId ? ' PUBLIC "' + node.publicId + '"' : '')
         + (!node.publicId && node.systemId ? ' SYSTEM' : '') 
         + (node.systemId ? ' "' + node.systemId + '"' : '')
         + '>';

No comments: