HTML stands for Hyper Text Markup Language. It is the standard markup language for creating Web pages.
HTML describes the structure of a Web page and consists of series of elements.
HTML elements tell the browser how to display the content – for example, check the image below.

HTML is rendered client-side. This means the browser takes the HTML file, processes it, applies styles (CSS), runs scripts (JavaScript), and then displays the final webpage. You can run HTML pages locally, without internet.
All the rendered websites on the internet are usually a result of what any server-side language (like PHP) will process.
Example:
- You visit a website like
example.com
. - Your browser requests the HTML file from the server.
- The server sends the HTML file (along with CSS and JavaScript).
- Your browser processes the files and renders the webpage on your screen.
Layout of an HTML document
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="https://patchstack.com/wp-content/uploads/2021/01/Logomark.svg" sizes="32x32" />
<title>Document</title>
</head>
<body>
</body>
</html>
This includes:
<!DOCTYPE html>
to declare the document as HTML5.<html>
as the root element.<head>
for metadata, including character set, viewport settings, and title.- <link rel=”icon”> adds a site icon (on your browser tab)
<body>
for the document content (empty in this case).
Comments in HTML
You can add comments to your code in HTML easily.
- Comments start with <!– and end with –>
- Comments are not rendered in browser
- Comments can make your complex code more readable
- Comments can be used to temporarily “comment something out” from your code
<h1>This is a title</h1>
<!-- Content starts -->
<p>This is a content</p>