What is HTML?

  • HTML stands for Hyper Text Markup Language
  • HTML is the standard markup language for creating Web pages
  • HTML describes the structure of a Web page
  • HTML consists of a series of elements
  • HTML elements tell the browser how to display the content
  • HTML elements label pieces of content such as “this is a heading”, “this is a paragraph”, “this is a link”, etc.

Basic HTML structure:

HTML Code Structure:

Example:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Page Title</title>
</head>
<body>
  <h2>Heading Content</h2>
  <p>Paragraph Content</p>
</body>
</html>

 

In This Code-

<!DOCTYPE html>:  This is the document type declaration. Technically it is not a tag. It declares a document as being an HTML document(Version of HTML). The doctype declaration is not case-sensitive.

<html>:This is called a root element. All other elements contained within it.

<head>:  The head Tag is a container for metadata (data about data) and is placed between the tag.

<title> :  Title tag that allows you to give a web page a title. This title can be found in the browser title bar, as well as in the search engine results pages.

<body> :  The element contains all the contents of an HTML document, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.

Advantages of HTML:

  • HTML is used to build websites.
  • It is supported by all browsers.
  • It can be integrated with other languages like CSS, JavaScript, etc.

Disadvantages of HTML:

  • HTML can only create static web pages. For dynamic web pages, other languages have to be used.
  • A large amount of code has to be written to create a simple web page.
  • The security feature is not good.