HTML (HyperText Markup Language) is the standard markup language for creating web pages and web applications. It provides a structure for the content on a web page and describes how that content should be displayed in a web browser.
HTML consists of a series of elements, which are represented by tags. These tags describe the content within them, such as headings, paragraphs, lists, links, images, and more.
Here are some basic HTML tags and their purposes:
<html>: Defines the start and end of an HTML document
<head>: Contains information about the document, such as the title (displayed in the browser’s tab), CSS stylesheets, and meta information
<body>: Contains the content of the document, such as text, images, and links
<h6>: Define headings of different levels (
<h1>is the largest and most important heading, while
<h6>is the smallest)
<p>: Defines a paragraph
<a>: Defines a hyperlink, used to link to other web pages or to specific elements within the same page
<img>: Displays an image
<ul>: Defines an unordered list, made up of individual list items represented by the
<ol>: Defines an ordered list, similar to an unordered list but with numbered items
<br>: Inserts a line break
<hr>: Inserts a horizontal rule (a line)
Here’s a simple example of an HTML document:
<html> <head> <title>My First HTML Page</title> </head> <body> <h1>Welcome to My Website</h1> <p>This is a paragraph of text.</p> <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> </body> </html>
This simple example demonstrates the basic structure of an HTML document, including the use of headings, paragraphs, and lists.