HTML (Notes)
1. Introduction to HTML:
• HTML (HyperText Markup Language) is the fundamental building block for web
development.
• HTML is not a programming language but a markup language that defines the structure
of web pages using various elements or tags.
2. Basic HTML Structure:
• Every HTML document consists of the following basic elements:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Title of the Page</title>
</head>
<body>
<!-- Content goes here -->
</body>
</html>
3. HTML Elements and Tags:
• Headings: Tags like <h1>, <h2>, ..., <h6> represent headings. <h1> is the largest and
most important heading, while <h6> is the smallest.
• Paragraphs: <p> is used to define paragraphs.
• Links: <a href="URL"> is used to create hyperlinks.
• Lists:
o Unordered List (<ul>) uses <li> for each item.
o Ordered List (<ol>) also uses <li> but numbers the items.
4. Forms:
• Forms are used to collect user input. Elements include:
o <input>: Input field for data entry.
o <button>: Button to submit the form.
o <textarea>: Multi-line text input.
o <select>: Dropdown menu for multiple choices.
<form action="/submit" method="POST">
<input type="text" name="username">
<input type="submit" value="Submit">
</form>
5. Semantic HTML:
• Semantic elements are used to convey the meaning of content to both the browser and
the developer. Examples include:
o <header>, <footer>, <article>, <section>, <aside>, and <nav>.