What is HTML

      Comments Off on What is HTML
Spread the love

HTML (HyperText Markup Language) is a markup language used to create and structure web pages. It is the standard language for building websites and is essential to web development.

To create a basic HTML document, you will need to follow these steps:

  1. Open a text editor such as Notepad or Sublime Text.
  2. Type the following code:
<!DOCTYPE html>
	<title>My Website</title>
	<h1>Welcome to my website</h1>
	<p>This is a paragraph of text.</p>
  1. Save the file with a .html extension, for example, “index.html”.
  2. Open the file in a web browser to view the webpage.

Let’s break down the code:

  • <!DOCTYPE html> is a declaration that specifies the version of HTML being used.
  • <html> is the opening tag for the HTML document, and </html> is the closing tag.
  • <head> contains information about the document, such as the title that appears in the browser’s title bar, and </head> is the closing tag.
  • <title> is where you can specify the title of your webpage, and </title> is the closing tag.
  • <body> is where you can include the content of your webpage, such as text, images, and links, and </body> is the closing tag.
  • <h1> is a heading tag, and the number indicates the level of importance of the heading. <h1> is the most important and <h6> is the least important.
  • <p> is a paragraph tag, which is used for regular text.

You can add more HTML elements to your webpage to create a more complex structure. For example, you can add lists, tables, forms, and multimedia elements such as images and videos.

In summary, HTML is a markup language used to create web pages. By learning HTML, you can create your own websites and customize them to your liking.