HTML Cheat Sheet
Related learning
View all courses
Document Structure:
Essential Tags:
<html>: Root element of an HTML page.<head>: Contains meta-information about the document.<title>: Specifies the title of the document.<body>: Contains the content of the HTML document.<meta>: Specifies metadata about the HTML document.
Text Formatting
<h1>to<h6>: Header tags,<h1>being the most important, and<h6>the least.<p>: Paragraph tag.<br>: Line break.<hr>: Thematic break in the page.<strong>/<b>: Bold text.<em>/<i>: Italicized text.<u>: Underlined text.<sup>: Superscript text.<sub>: Subscript text.
Hyperlinks and Images
<a href="url">link text</a>: Creates a hyperlink.<img src="url" alt="alternative text">: Embeds an image.
Lists
- Unordered List:
- Ordered List:
Tables
Forms
Useful Attributes
id: Defines a unique id for an element.class: Defines one or more class names for an element.style: Applies CSS styles directly to the element.title: Adds extra information about an element (usually shown as a tooltip).
CSS Integration
<link rel="stylesheet" href="styles.css">
JavaScript Integration
<script src="script.js"></script>
Tips for Better HTML Coding
<header>, <footer>, <article>, etc.) to enhance SEO and accessibility.This HTML cheat sheet provides a quick overview of the essential HTML elements and their use.
Keep it handy to refer to as you build or maintain web pages.
Written by
