HTML Introduction
What is HTML?
HTML stands for HyperText Markup Language. HTML is the standard language for creating web pages. HTML describes the structure and layout of web pages using tags and attributes. Basically, HTML tells the browser how to display the content.
Basic Structure of an HTML Document
Example
<!DOCTYPE html>
<html>
<head>
<title>Nepal Coding School</title>
</head>
<body>
</body>
</html>
Example Explained
- The
<!DOCTYPE html>
declaration defines that this document is html document. - The
<html>
is a root element of a web page. - The
<head>
contains the information about the document. - The
<title>
display on the title bar of a web page tab - The
<body>
contains the entire content of the webpages, such as text, images, links etc.
Key HTML Elements
- Headings: Defined with
<h1>
to<h6>
tags, where<h1>
is the highest level heading and<h6>
is the lowest. - Paragraphs: Defined with the
<p>
tag. - Links: Created using the
<a>
tag with thehref
attribute. - Images: Embedded using the
<img>
tag with thesrc
attribute. - Lists: Ordered lists (
<ol>
) and unordered lists (<ul>
) with list items (<li>
).