Introduction to HTML

Introduction to HTML

What is HTML?

HTML stands for Hyper Text Markup Language. It is used to create a structure of your website. It is easy to learn and you can create cool static websites just by using HTML.

HTML consists of a series of elements and tags to create a structure or a framework of your web page.

A Simple HTML Document

<!DOCTYPE html>
<html lang=“en”>
    <meta charset=“UTF-8”>
    <meta http-equiv=“X-UA-Compatible”
    <meta name=“viewport”
    <h1>My First Heading</h1>
    <p>My first paragraph.</p>

Here is the output

Our first HTML document

All about HTML elements

An HTML element consists of the “Start Tag” some content “End Tag”.

For Eg: <h1> My first document </h1>

The “<h1>” tag is the start tag of heading followed by the content and then “</h1>” which is the end tag.

NOTE – In some of the HTML elements, we do not put any content neither they have an end tag. For Eg: “<br>” – Line Break Tag. These are called empty elements.

HTML Page structure

This is how an HTML page is created and structure while creating any website

The basic structure of an HTML document

Points to remember -

  • The <Doctype html> tag is used to determine the document type and that this document is an HTML 5 document.
  • The <html> element is known as the root element of the Html document.
  • The <head> tag contains all the meta information of the webpage.
  • The <title> element is used to give a title for the HTML page (shown in the browser’s title bar or in the page’s tab)
  • The <body> element defines the document’s body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
In our upcoming posts we will be coming up with more content about HTML, wherein we will be explaining about editors, elements, tags and many more.
Till then you can check out our other post on All about Full Stack Developer