Skip to main content

Posts

Showing posts with the label HTML DOCTYPE

HTML DOCTYPE | HTML Document Type Declaration - Example of a DOCTYPE declaration for HTML

HTML <! DOCTYPE>: The Document Type Declaration, or DOCTYPE, is an instruction in an HTML document that specifies the version of HTML or XHTML being used. It helps browsers to correctly render and display the document by indicating the rules and specifications to follow. The DOCTYPE declaration is placed at the very beginning of an HTML document, typically within the `<!DOCTYPE>` tag. Here is an example of a DOCTYPE declaration for HTML5: html <!DOCTYPE html> <html lang="en"> <head>   <meta charset="UTF-8">   <meta name="viewport" content="width=device-width, initial-scale=1.0">   <title>HTML DOCTYPE Example</title> </head> <body>   <!-- The content of the HTML document goes here --> </body> </html> HTML DOCTYPE In this example: - `<!DOCTYPE html>` specifies that the document follows the HTML5 standard. - The HTML document is then contained within the...