🌐

HTML5 Cheatsheet

Basic Structure

<!DOCTYPE html>
Defines the document type
<html>
Root element of an HTML page
<head>
Contains meta information about the document
<title>
Specifies a title for the document
<body>
Contains the visible page content

Text Formatting

<h1> to <h6>
Defines HTML headings
<p>
Defines a paragraph
<br>
Inserts a single line break
<hr>
Defines a thematic change in the content
<strong>
Defines important text (bold)
<em>
Defines emphasized text (italic)

Links and Images

<a href="url">
Defines a hyperlink
<img src="url" alt="text">
Embeds an image
target="_blank"
Opens link in a new tab/window

Lists

<ul>
Defines an unordered list
<ol>
Defines an ordered list
<li>
Defines a list item

Forms

<form>
Defines an HTML form for user input
<input type="text">
Defines a one-line text input field
<input type="radio">
Defines a radio button
<input type="submit">
Defines a submit button