HTML (which stands for Hypertext Markup Language) is a computer language that makes up most web pages and online applications. A hypertext is a text that is used to reference other pieces of text, while a markup language is a series of markings that tells web servers the style and structure of a document.




Why do we use HTML?

HTML is used for web development, internet navigation, and web documentation.

·         Web development

Developers use HTML code to design how a browser displays web page elements, such as text, hyperlinks, and media files. 

·         Internet navigation

Users can easily navigate and insert links between related pages and websites as HTML is heavily used to embed hyperlinks. 

·         Web documentation

HTML makes it possible to organize and format documents, similarly to Microsoft Word.

 

What application of HTML?

DOCTYPE

A doctype or document type declaration is an instruction that tells the web browser about the markup language in which the current page is written. The Doctype is not an element or tag; it lets the browser know about the version of or standard of HTML or any other markup language that is being used in the document.

Declaration of a Doctype: A DOCTYPE declaration appears at the top of a web page before all other elements. According to the HTML specification or standards, every HTML document requires a document type declaration to ensure that the pages are displayed in the way they are intended to be displayed.

The DOCTYPE for HTML5 is case-insensitive and can be written as shown below:

< !DOCTYPE html >

 

Why Doctype it is used in HTML?

Doctype Usage: In the version, of HTML 4.01, the usage of DOCTYPE declaration was to create a reference to a document type definition (DTD), since the version of HTML 4.01 was completely based on a Standard Generalized Markup Language(SGML).
 The document type definition (DTD) is responsible for specifying the rules for the Standard Generalized Markup Language(SGML) so that the browser processes the content correctly. But in the HTML version, HTML 5 there isn’t any need for a reference to a document type definition (DTD) because HTML 5 is not based on a Standard Generalized Markup Language(SGML).

In HTML 5, the DOCTYPE declaration is only required for enabling the standard mode for writing documents.
 Below is a sample HTML program with doctype declaration:


What are meta tags and why it is needed?

The <meta> tag defines metadata about an HTML document. Metadata is data (information) about data.

<meta> tags always go inside the <head> element and are typically used to specify the character set, page description, keywords, author of the document, and viewport settings.

Metadata will not be displayed on the page but is machine parsable.

Metadata is used by browsers (how to display content or reload pages), search engines (keywords), and other web services.

There is a method to let web designers take control over the viewport (the user's visible area of a web page), through the <meta> tag.