<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
</body>
</html>
DOCTYPE:
Due several versions of HTML, each web page should begin with a DOCTYPE declaration to tell a browser which version of HTML the page is using (although browsers usually display the page even if it is not included).
HTML5
<!DOCTYPE html>
HTML4
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Transitional XHTML 1.0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Strict XHTML 1.0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
XML Declaration
<?xml version="1.0" ?>
head
This contains information about the page (rather than information that is shown within the main part of the browser window). You will usually find a <title> element inside the <head> element.lang
Attribute called lang is used to indicate the language used. The value of this attribute on this page specifies it is in US English.
Let me know in the comment section if you have any question.
Previous Post:
Introduction to Html
meta
The <meta> element lives inside the <head> element and contains information about that web page. The <meta> element is an empty element so it does not have a closing tag. It uses attributes to carry the information. For exampledescription
This contains a description of the page. This description is commonly used by search engines to understand what the page is about and should be a maximum of 155 characters. Sometimes it is also displayed in search engine results.<meta name="description" content="An Essay on Installation Art" />
title
The contents of the <title> element are either shown in the top of the browser, above where you usually type in the URL of the page you want to visit, or on the tab for that page (if your browser uses tabs to allow you to view multiple pages at the same time).body
Everything inside this element is shown inside the main browser window.
Let me know in the comment section if you have any question.
Previous Post:
Introduction to Html
Next Post: