Chapter 3: Introduction to HTML
What is HTML?
- HTML stands for Hyper Text Markup Language.
- HTML is used to create web pages.
- HTML describes the structure of a web page.
- HTML uses tags and elements.
- HTML Founder: Tim Berners-Lee (1991)
A Simple HTML Document
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
Introduction
➥ In previous chapters, we learned different HTML tags and attributes used to design web pages. In this chapter, we will learn how to create Lists and Tables. These features make web pages attractive and professional.
Lists in HTML
➩ Lists are used to arrange items in an organised form. They help to group related information together.
List Item Tag: <li> is used to create list items.
Syntax
<li> Item Name </li>
Types of Lists in HTML
1. Unordered List
Used when order is not important.
<ul type="disc"> <li>Milk</li> <li>Bread</li> <li>Butter</li> </ul>
- Milk
- Bread
- Butter
➥ Type Attribute - Disc, Circle, Square
2. Ordered List
Used when order is important.
<ol type="1"> <li>Wake Up</li> <li>Study</li> <li>Sleep</li> </ol>
- Wake Up
- Study
- Sleep
3. Description List
<dl> <dt>HTML</dt> <dd>Hyper Text Markup Language</dd> </dl>
- HTML
- Hyper Text Markup Language
Table in HTML
<table>
<tr>
<th>Name</th>
<th>Class</th>
</tr>
<tr>
<td>Rahul</td>
<td>10th</td>
</tr>
</table>
| Name | Class |
|---|---|
| Rahul | 10th |
No comments:
Post a Comment