Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
193 changes: 193 additions & 0 deletions CheatSheets/HTML-CheatSheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
# HTML CheatSheet

## Basic Structure

```html

<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
Content goes here
</body>
</html>

```

## Headings

```html

<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>

```

## Paragraphs

```html

<p>This is a paragraph</p>

```

## Line Break

```html

<p>This is the first line.<br>This is the second line.</p>

```

## Horizontal Line

```html

<hr>

```

## Links

```html

<a href="https://www.example.com">Link text</a>

```

## Lists

### Unordered List

```html

<ul>
<li>List item 1</li>
<li>List item 2</li>
</ul>

```

### Ordered List

```html

<ol>
<li>List item 1</li>
<li>List item 2</li>
</ol>

```

## Tables

```html

<table>
<thead>
<tr>
<th>Column 1</th>
<th>Column 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>Row 1, Column 1</td>
<td>Row 1, Column 2</td>
</tr>
<tr>
<td>Row 2, Column 1</td>
<td>Row 2, Column 2</td>
</tr>
</tbody>
</table>

```

## Forms

```html

<form>
<label for="input">Input Label:</label>
<input type="text" id="input" name="inputName">

<label for="checkbox">Checkbox Label:</label>
<input type="checkbox" id="checkbox" name="checkboxName" value="checkboxValue">

<label>Radio Label 1:</label>
<input type="radio" name="radioName" value="radioValue1">

<label>Radio Label 2:</label>
<input type="radio" name="radioName" value="radioValue2">

<label for="date">Date:</label>
<input type="date" id="date" name="dateName">

<label for="number">Number:</label>
<input type="number" id="number" name="numberName">

<label for="color">Color:</label>
<input type="color" id="color" name="colorName">

<label for="file">File:</label>
<input type="file" id="file" name="fileName">

<button type="reset">Reset</button>
<button type="submit">Submit</button>
</form>

```

## Images

```html

<img src="image.jpg" alt="Image description">

```

## Iframes

### Youtube Video

```html

<iframe width="560" height="315" src="https://www.youtube.com/embed/VIDEO_ID" frameborder="0" allowfullscreen></iframe>

```

### External Webpage

```html

<iframe src="https://www.example.com"></iframe>

```

## Audio

```html

<audio src="audio_file.mp3" controls></audio>

```

## Video

```html

<audio src="audio_file.mp3" controls></audio>

```


# Learn More about HTML from here:

https://www.w3schools.com/html/