HTML Basics

HTML stands for HyperText Markup Language, and it is used to create the structure and content of web pages. HTML is made up of tags, which are used to define different elements on a webpage. Here's an example of a basic HTML document:

<!DOCTYPE html>
<html>
<head>
	<title>My Webpage</title>
</head>
<body>
	<h1>Welcome to my webpage</h1>
	<p>This is the content of my webpage.</p>
</body>
</html>

In this example, we have used several HTML tags. Let's break down what each tag does:

  • <!DOCTYPE html>: This is a declaration that tells the browser what version of HTML the document is using. In this case, it's HTML5.

  • <html>: This tag indicates the start of the HTML document. All other HTML tags will be inside this tag.

  • <head>: This tag contains information about the document that isn't displayed on the page, such as the title of the page, metadata, and links to external resources.

  • <title>: This tag is used to specify the title of the webpage, which is displayed in the browser's title bar.

  • <body>: This tag contains all of the visible content on the webpage, including text, images, and other elements.

  • <h1>: This tag is used to create a heading. There are six different levels of headings, with <h1> being the most important.

  • <p>: This tag is used to create a paragraph of text.

There are many other HTML tags that you can use to create different types of content on a webpage, such as images, links, lists, forms, tables, and more. By combining different HTML tags and attributes, you can create complex web pages with a variety of different elements.