HTML Cheatsheet

An Interactive Refresher of HTML Concepts

HTML Tags and Comments

<-- This is an HTML comment -->

<div> Same line div content </div>

<div>
This div has opening and closing tags
on different lines.
</div>

HTML Attributes and Children

<div id="my-id-value" class="my-class-value">
This div has three different children
<img src="img-src.jpeg" alt="alt description">
<div id="my-other-id-value" class="my-class-value">
This div is both a child and a parent
</div>
</div>

Void Elements

Remember that void elements are HTML elements that should NOT have a closing tag. Every other HTML tag SHOULD have a closing tag.

Here are some common void elements you will encounter in our class.

<head> Elements

<link> - Link (to external resources)

<body> Elements

<br> - Line Break
<hr> - Horizontal Rule
<img> - Image