HTML Cheatsheet
HTML Cheatsheet
1/4 2/4
HTML CHEAT SHEET HTML CHEAT SHEET
<img> tag Form
It is used to embed or import image in a webpage.
Sample Form
<img src="Source_of_image" alt="Alternate text">
Form is used to collect user's input, generally user's data is sent to server for further processing.
<video> tag <form action="/action.php" method="post">
It is used to embed video in the webpage. Name: <input name="name" type="text" /> <br />
<video width="480" height="320" controls> Age: <input max="90" min="1" name="age" step="1" type="number" value="18" />
<source src="demo_move.mp4" type="video/mp4"> <select name="gender">
Your browser does not support the video tag. <option selected="selected" value="male">Male</option>
</video> <option value="female">Female</option>
Table </select><br /> <input checked="checked" name="newsletter" type="radio"
value="daily" /> Dai type="radio" value="weekly" /> Weekly<br /> <textarea
A table is a collection of rows and columns. It is used to represent data in tabular form.
cols="20" name="comments" rows="5">Comment</textarea><br />
Table Structure <label><input name="terms" type="checkbox" value="tandc" />Accept terms</lab
<table> <input type="submit" value="Submit" />
<caption>Demo Table</caption> </form>
<thead>
<tr>
Characters & Symbols
<th>Column1</th> Some symbols are not directly present on the keyboard, but there are some ways to use them in
<th colspan="2">Column2</th> HTML documents. We can display them either by entity name, decimal, or hexadecimal value.
</tr> Copyright Symbol (©)
</thead> ©
<tbody>
<tr>
Less than (<)
<td>Data1</td> <
<td>Data2</td> Greater than (>)
<td>Data2</td> >
</tr> Ampersand (&)
<tr> &
<td>Data1</td>
<td>Data2</td>
Dollar ($)
<td>Data2</td> $
</tr> Semantic Elements
</tbody>
Semantic elements are those elements that are self describable, i.e., from their name itself, you
<tfoot>
can understand their meaning.
<tr>
<td> </td> <section> tag
<td>Data</td> It defines a section in the document
<td>Data</td> <section>This is a section</section>
</tr> <article> tag
</tfoot>
It represents self-contained content
</table>
<article> Enter your data here </article>
Links <aside> tag
Links are clickable text that can redirect you to some other page. It is used to place content in the sidebar
<a> tag <aside> Your data </aside>
<a> or anchor tag defines a hyperlink.
<a href="https://www.codewithharry.com/">Visit CodeWithHarry.com!</a>
3/4 4/4