Category: html_css
what is html
Published on 23 Jun 2026
Explanation
HTML (HyperText Markup Language) is the
standard language used to create web
pages. Every HTML document starts with
a basic structure that includes the
DOCTYPE declaration, html, head, and body
tags.
Code:
<!DOCTYPE html>
<html>
<head>
<title>My First Page</title>
</head>
<body>
<h1>Welcome to HTML</h1>
</body>
</html>
Explanation
The <!DOCTYPE html> declaration tells the
browser that the document is written
in HTML5. It should always be
the first line of an HTML
document.
Code:
<!DOCTYPE html>
<html>
<body>
<p>This page uses HTML5.</p>
</body>
</html>
Explanation
The <html> tag is the root
element of an HTML page. All
other HTML elements are placed inside
this tag.
Code:
<html>
<head></head>
<body>
<h1>Root Element Example</h1>
</body>
</html>
Explanation
The <head> section contains metadata about
the webpage such as the title,
character encoding, stylesheets, and scripts. This
content is not displayed on the
page.
Code:
<head>
<title>HTML Basics</title>
<meta charset="UTF-8">
</head>
Explanation
The <body> section contains all visible
content such as headings, paragraphs,
images,
links, and forms that users interact
with on the webpage.
Code:
<body>
<h1>HackForge Academy</h1>
<p>Learn HTML, CSS, JavaScript,
and React.</p>
</body>