HTML
HTML (HyperText Markup Language) is a markup language used to create the structure and describe the meaning of content on web pages. It defines headings, paragraphs, links, images, lists, tables, forms, and page sections.
HTML is not a programming language. It does not execute algorithms but describes which elements are present in a document and what purpose they serve. A browser reads the HTML code and uses it to build the structure of the displayed page.
HTML elements, tags, and attributes
An HTML document consists of elements created with tags. A link may be written as follows:
<a href="/contact/">Contact</a>
In this example, <a> is the opening tag, </a> is the closing tag, and href is an attribute that specifies the link’s destination. Together, they form an HTML element.
Some elements, including <img>, <input>, and <meta>, do not have closing tags. Attributes provide additional information or modify how an element behaves.
Basic structure of an HTML document
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Page title</title>
</head>
<body>
<h1>Page heading</h1>
<p>Paragraph content.</p>
</body>
</html>The <html> element is the root of the document. The <head> section contains information such as metadata and the page title, while <body> contains the content presented to the user.
What is semantic HTML?
Semantic HTML means choosing elements according to their meaning rather than their appearance alone. For example, <nav> represents navigation, <main> identifies the main content, <article> represents a self-contained resource, and <footer> defines a footer.
Correct semantics help browsers, search engines, and assistive technologies understand a page’s structure. They also support accessibility, SEO, and maintainable code.
HTML vs. CSS and JavaScript
HTML defines the structure and meaning of content. CSS controls its presentation, including colors, spacing, and layout. JavaScript adds interactions, handles events, and can modify page content dynamically.
These three technologies form the foundation of modern front-end development and are commonly used together.
HTML5 and the current HTML standard
The term HTML5 is still widely used to describe modern HTML. However, the standard is no longer developed only through separate numbered releases. It now exists as the continuously updated HTML Living Standard.