0% found this document useful (0 votes)
3 views3 pages

HTM Base

HTML is a markup language that structures web content, organizing elements like headings, paragraphs, and images. An HTML document follows a specific structure, including declarations, a head for metadata, and a body for main content. Common tags include headings, paragraphs, links, images, and lists, with key attributes for styling and functionality.

Uploaded by

Nagaraj M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

HTM Base

HTML is a markup language that structures web content, organizing elements like headings, paragraphs, and images. An HTML document follows a specific structure, including declarations, a head for metadata, and a body for main content. Common tags include headings, paragraphs, links, images, and lists, with key attributes for styling and functionality.

Uploaded by

Nagaraj M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

What is HTML?

HTML is a markup language used to structure content on the web. It provides the framework
for web pages by organizing elements like headings, paragraphs, links, images, tables, forms,
and more.

Basic Structure of an HTML Document

An HTML document typically follows this structure:

html

<!DOCTYPE html>

<html>

<head>

<title>My First Webpage</title>

</head>

<body>

<h1>Welcome to HTML!</h1>

<p>This is a paragraph on my web page.</p>

</body>

</html>

Explanation:

<!DOCTYPE html>: Declares the document as HTML5.

<html>: The root element that contains all HTML content.

1
<head>: Metadata about the document (e.g., title, links to stylesheets).

<body>: The main content of the web page.

Common HTML Tags

Headings: Use <h1> to <h6> for headings (largest to smallest).

html

<h1>Main Heading</h1>

<h2>Subheading</h2>

Paragraph: <p> for text.

html

<p>This is a paragraph.</p>

Links: <a> for hyperlinks.

html

<a href="https://example.com">Visit Example</a>

Images: <img> to display images.

html

<img src="image.jpg" alt="Description of the image">

Lists:

2
Ordered List:

html

<ol>

<li>Item 1</li>

<li>Item 2</li>

</ol>

Unordered List:

html

<ul>

<li>Item A</li>

<li>Item B</li>

</ul>

Key Attributes

class and id: Used for styling with CSS or JavaScript.

alt: Provides alternative text for images.

href: Specifies links for <a> tags.

You might also like