HTML (Hyper Text Markup Language)


HTML is the standard markup language for Web pages. HTML stands for Hyper Text Markup Language. HTML describes the structure of a Web page

Every HTML document starts with a declaration, which tells the browser that you’re using HTML5. Here’s a simple structure:

<!DOCTYPE html>
<html>
  <head>
    <title>My First Page</title>
  </head>
  <body>
    <h1>My First Heading</h1>
    <p>My first paragraph.</p>
  </body>
</html>

  • <!DOCTYPE html> – declaration defines that this document is an HTML5 document
  • <html> – root element of an HTML page
  • <head> – element contains meta information about the HTML page
  • <title> – element specifies a title for the HTML page
  • <body> – element defines the document’s body, and is a container for all the visible contents. Everything that you see on the web page is under body tag.
  • <h1> – element defines a large heading
  • <p> – element defines a paragraph

Output

My First Page

My First Heading

My first paragraph.

 

HTML Element

An HTML element is defined by a start tag, some content, and an end tag:

<tagname> Content goes here… </tagname>

The HTML element is everything from the start tag to the end tag:

<h1>My First Heading</h1>

 

HTML Tag

An HTML tag is a piece of code used to define or enclose content within an HTML document. Tags are used to create HTML elements and generally come in pairs: an opening tag and a closing tag

Scroll to Top