diff options
author | Sébastien Adam <sebastien.adam.webdev@gmail.com> | 2015-11-25 18:30:34 +0100 |
---|---|---|
committer | Sébastien Adam <sebastien.adam.webdev@gmail.com> | 2015-11-25 18:30:34 +0100 |
commit | dfcc5318d378ae66dd21806c6ac2dad67d73dc26 (patch) | |
tree | 9fb50777604765edf3cf8a4ab17d525b4f7d0b49 | |
parent | fd70fa5ff7cec722a69f3e720a962aea3dec03fe (diff) |
HTML Helper - doctype(): now default type is HTML 5
-rw-r--r-- | system/helpers/html_helper.php | 2 | ||||
-rw-r--r-- | user_guide_src/source/helpers/html_helper.rst | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 4e25f8c9b..b4c605a01 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -229,7 +229,7 @@ if ( ! function_exists('doctype')) * @param string type The doctype to be generated * @return string */ - function doctype($type = 'xhtml1-strict') + function doctype($type = 'html5') { static $doctypes; diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst index 1445b3bf0..bfd4afbe2 100644 --- a/user_guide_src/source/helpers/html_helper.rst +++ b/user_guide_src/source/helpers/html_helper.rst @@ -324,18 +324,18 @@ The following functions are available: // <meta charset="UTF-8" /> -.. php:function:: doctype([$type = 'xhtml1-strict']) +.. php:function:: doctype([$type = 'html5']) :param string $type: Doctype name :returns: HTML DocType tag :rtype: string - Helps you generate document type declarations, or DTD's. XHTML 1.0 - Strict is used by default, but many doctypes are available. + Helps you generate document type declarations, or DTD's. HTML 5 + is used by default, but many doctypes are available. Example:: - echo doctype(); // <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + echo doctype(); // <!DOCTYPE html> echo doctype('html4-trans'); // <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |