doctype - print DOCTYPE declaration

SYNOPSIS

<doctype $langver [$type]>


DESCRIPTION
The <doctype> function prints a <!DOCTYPE> declaration based on the $langver and $type arguments, which are shorthand aliases for some common delcarations. Using this function makes code more compact, since the entire standard declaration need not be entered, as well as helps check for errors/typos. The possible values for $langver are:

  • html2.0 - For HTML 2.0

  • html3.2 - For HTML 3.2

  • html4.01 - For HTML 4.01; a $type must be given also

  • html5 - For HTML 5

  • xhtml1.0 - For XHTML 1.0; a $type must be given also

  • xhtml1.1 - For XHTML 1.1

The possible values for $type are:

  • strict - For the Strict DTD

  • transitional or loose - For the Transitional DTD

  • frameset - For the Frameset DTD


DIAGNOSTICS
doctype returns 1 on success, or 0 on error.


EXAMPLE

<doctype "xhtml1.0" "loose">


CAVEATS
The <doctype> function was add in version 5.01.1220042000 20080829.


Copyright © Thunderstone Software     Last updated: Oct 24 2023
Copyright © 2024 Thunderstone Software LLC. All rights reserved.