Basic HTML notes
Basic HTML notes
1. What is HTML?
- HTML (HyperText Markup Language) is the standard language used to create web pages.
Every HTML document has a basic structure that includes the following elements:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document Title</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>This is a paragraph.</p>
</body>
</html>
```
- `<head>`: Contains meta-information about the document (like title, character set).
- `<body>`: Contains the content of the document (text, images, links, etc.).
3. Common HTML Elements
- Headings: Used to define headings. Ranges from `<h1>` (largest) to `<h6>` (smallest).
```html
```
```html
<p>This is a paragraph.</p>
```
```html
```
```html
```
- Lists:
```html
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
```
- Ordered List: A numbered list.
```html
<ol>
<li>First Item</li>
<li>Second Item</li>
</ol>
```
```html
<div>
<h2>Section Title</h2>
</div>
```
```html
```
4. Attributes
```html
```
5. Comments
- Comments are not displayed in the browser and are used to leave notes in the code.
```html
```
Summary
- HTML is the backbone of web pages, providing structure and meaning to content.
- Understanding the basic elements and structure is essential for creating web pages.