DEV Community

Cover image for Introduction of HTML
Ravi  kumar
Ravi kumar

Posted on • Edited on

Introduction of HTML

HTML (HyperText Markup Language) is a standard markup language for creating web pages and web applications. HTML is written in the form of HTML elements consisting of tags enclosed in angle brackets (like ). HTML tags typically come in pairs like although some tags, known as self-closing tags, are unpaired, for example br.

HTML is used to structure the content of a web page, and to define the meaning and behavior of that content. For example, you can use HTML to create headings, paragraphs, lists, links, images, and more.

Here is a simple example of an HTML page:

<!DOCTYPE html>
<html>
<head>
  <title>My Page</title>
</head>
<body>
  <h1>Welcome to my page</h1>
  <p>This is my first web page.</p>
  <ul>
    <li>Item 1</li>
    <li>Item 2</li>
    <li>Item 3</li>
  </ul>
</body>
</html>

Enter fullscreen mode Exit fullscreen mode

The <!DOCTYPE html> declaration at the top of the page tells the web browser that this is an HTML5 document. The element is the root element of the HTML page, and all other elements are contained within it. The

element contains metadata about the page, such as the page title, and the element contains the actual content of the page. In this example, the page has a heading h1 and a paragraph p, as well as an unordered list ul with three list items li.

HTML is a powerful and flexible language, and it is the foundation of the modern web. If you want to learn more about HTML, there are many resources available online, such as tutorials, guides, and reference materials.

Top comments (0)