HTML (HyperText Markup Language) is the standard language used to create and structure content on the web. It uses tags to define elements like headings, paragraphs, links, and images, allowing browsers to display web pages correctly.
What is HTML?
HTML stands for HyperText Markup Language.
It is used to create the structure of web pages.
HTML uses tags (like <p>, <h1>, <a>) to define elements.
It is not a programming language, but a markup language.
Browsers read HTML to display text, images, links, and layout.
HTML files have .html or .htm extensions.
A Simple HTML Program
<!DOCTYPE html>
<html>
<head>
<title> Page Title </title>
</head>
<body>
<h1> Hello, World! </h1>
<p> This is a live preview editor </p>
</body>
</html>
Output
In above example
<!DOCTYPE html> – Declares the document type as HTML5.
<html> – Starts the HTML document.
<head> – Contains meta-information about the page (not visible on the page).
<title> Page Title </title> – Sets the title shown in the browser tab.
</head> – Ends the head section.
<body> – Begins the visible part of the webpage.
<h1> Hello, World! </h1> – Displays a large heading with the text "Hello, World!".
<p> This is a live preview editor </p> – Shows a paragraph of text.