Basic Structure of HTML

 


HTML stands for HyperText Markup Language. It is a markup language used to create web pages. HTML describes the structure of a web page by using tags. Tags are special words that tell the web browser how to display the content of a web page.

The basic structure of an HTML document consists of five elements:

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>
  5. <body>

The <!DOCTYPE html> element is called the Document Type Declaration. It tells the web browser which version of HTML the document is using. The <html> element is the root element of an HTML document. It contains all the other elements of the document. The <head> element contains information about the document, such as the title, the author, and the keywords. The <title> element contains the title of the document. The <body> element contains the actual content of the document

Here is an example of a basic HTML document:

HTML
<!DOCTYPE html>
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<h1>This is my first HTML page!</h1>
<p>I'm so excited to learn HTML!</p>
</body>
</html>

This document will create a simple web page with a heading and a paragraph. The heading will say "My First HTML Page" and the paragraph will say "I'm so excited to learn HTML!".

In addition to the five basic elements, there are many other HTML elements that can be used to create web pages. Some of the most common elements include:

  • <a>: This element is used to create hyperlinks.
  • <img>: This element is used to insert images into a web page.
  • <table>: This element is used to create tables.
  • <form>: This element is used to create forms.

HTML is a simple language to learn, but it can be very powerful. With HTML, you can create all sorts of different web pages, from simple static pages to complex interactive applications.

Next Post Previous Post
1 Comments
  • Ram Kourav
    Ram Kourav June 22, 2023 at 1:54 AM

    hiii

Add Comment
comment url