0% found this document useful (0 votes)
6 views

HTML Basics

HTML (HyperText Markup Language) is the standard markup language for creating web pages, structured using elements represented by tags. Key components include common tags like <html>, <head>, <body>, lists, tables, and forms, which help organize content and collect user input. Attributes provide additional information about elements, enhancing their functionality.

Uploaded by

sagar
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)
6 views

HTML Basics

HTML (HyperText Markup Language) is the standard markup language for creating web pages, structured using elements represented by tags. Key components include common tags like <html>, <head>, <body>, lists, tables, and forms, which help organize content and collect user input. Attributes provide additional information about elements, enhancing their functionality.

Uploaded by

sagar
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

HTML Basics

What is HTML?
HTML (HyperText Markup Language) is the standard markup language for creating web pages and

web applications. It describes the structure of a web page using elements represented by tags.

HTML Structure
<!DOCTYPE html>

<html>

<head>

<title>Page Title</title>

</head>

<body>

<h1>This is a Heading</h1>

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

</body>

</html>

Common HTML Tags


<html>: Root element of an HTML document.

<head>: Contains metadata and links to styles/scripts.

<body>: Contains the content of the web page.

<h1> to <h6>: Define headings.

<p>: Defines a paragraph.

<a>: Defines hyperlinks.

<img>: Embeds images.

Attributes
Attributes provide additional information about an element. They are defined in the opening tag and

usually come in name/value pairs.

Example:

<img src='image.jpg' alt='Description'>

Lists
HTML provides two types of lists:

1. Ordered List (<ol>) - Numbered items.

2. Unordered List (<ul>) - Bulleted items.

Example:

<ul>

<li>Item 1</li>

<li>Item 2</li>

</ul>

Tables
Tables are used to display data in rows and columns.

Example:

<table>

<tr>

<th>Header 1</th>

<th>Header 2</th>

</tr>

<tr>

<td>Data 1</td>

<td>Data 2</td>

</tr>
</table>

Forms
Forms are used to collect user input.

Example:

<form action='/submit'>

<label for='name'>Name:</label>

<input type='text' id='name' name='name'>

<input type='submit' value='Submit'>

</form>

You might also like