• May 30, 2017

    Example code of HTML5 doctype declaration

    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 Document</title>
    </head>
    
    <body>
    Content goes here...
    </body>
    </html>

    Other common types of doctype declarations
    HTML 4.01 Strict
    HTML 4.01 Transitional
    HTML 4.01 Frameset
    XHTML 1.0 Strict
    XHTML 1.0 Transitional
    XHTML 1.0 Frameset
    XHTML 1.1

    1) HTML 4.01 Strict

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>HTML 4.01 Strict - doctype declaration</title>
    </head>
    <body>
    Content goes here....
    </body>
    </html>
    2) HTML 4.01 Transitional

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>HTML 4.01 Transitional - doctype declaration</title>
    </head><body>
    Content goes here...
    </body>
    </html>

    3) HTML 4.01 Frameset

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>HTML 4.01 Frameset - doctype declaration</title>
    </head><body>
    Content goes here...
    </body>
    </html>

    4) XHTML 1.0 Strict

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>XHTML 1.0 Strict - doctype declaration</title>
    </head><body>
    Content goes here....
    </body>
    </html>

    5) XHTML 1.0 Transitional

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>XHTML 1.0 Transitional - doctype declaration</title>
    </head><body>
    Content goes here...
    </body>
    </html>
    http://codingcyber.com/html5-doctype-declaration-3067/


เวอไนน์ไอคอร์ส

ประหยัดเวลากว่า 100 เท่า!






เวอไนน์เว็บไซต์⚡️
สร้างเว็บไซต์ ดูแลเว็บไซต์

Categories


Uncategorized