0% found this document useful (0 votes)
5 views4 pages

HTML Cheat Sheet

This document is an HTML cheat sheet that outlines the basic structure and elements of HTML, including document structure, text formatting, links, images, tables, objects, iframes, HTML5 tags, and special characters. It provides examples for each section to illustrate the usage of various HTML elements. The cheat sheet serves as a quick reference for web developers and designers.

Uploaded by

Kalibbala Joshua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views4 pages

HTML Cheat Sheet

This document is an HTML cheat sheet that outlines the basic structure and elements of HTML, including document structure, text formatting, links, images, tables, objects, iframes, HTML5 tags, and special characters. It provides examples for each section to illustrate the usage of various HTML elements. The cheat sheet serves as a quick reference for web developers and designers.

Uploaded by

Kalibbala Joshua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

HTML Cheat Sheet - Simple Notes

---

DOCUMENT STRUCTURE

<html>...</html>: Root element wrapping all content.

<head>...</head>: Contains metadata, scripts, stylesheets.

<title>...</title>: Page title (displayed in browser tab).

<body>...</body>: Contains visible content.

Example:

<html>

<head>

<title>My Website</title>

</head>

<body>

<!-- Content -->

</body>

</html>

---

DOCUMENT INFORMATION

<meta charset="utf-8">: Sets character encoding.

<link rel="stylesheet" href="style.css">: Links external CSS.

<style>...</style>: Embeds CSS.

<script>...</script>: Embeds or links JavaScript.


---

TEXT FORMATTING

<strong>...</strong>: Bold text.

<em>...</em>: Italic text.

<blockquote>...</blockquote>: Block quotation.

<code>...</code>: Inline code snippet.

<pre>...</pre>: Preformatted text (preserves whitespace).

Example:

<p><strong>Bold</strong> and <em>italic</em> text.</p>

<blockquote>Quote here.</blockquote>

---

LINKS & IMAGES

<a href="url">Link</a>: Hyperlink.

- href="#section": Link to page section.

- href="mailto:email": Email link.

- href="tel:123": Phone link.

<img src="image.jpg" alt="Description">: Embeds an image.

- width, height, alt are key attributes.

Example:

<a href="https://example.com">Visit Example</a>

<img src="logo.png" alt="Logo" width="100">


---

TABLES

<table>...</table>: Defines a table.

<tr>...</tr>: Table row.

<th>...</th>: Header cell.

<td>...</td>: Data cell.

<thead>, <tbody>, <tfoot>: Table sections.

Example:

<table>

<tr>

<th>Name</th>

<th>Age</th>

</tr>

<tr>

<td>Alice</td>

<td>30</td>

</tr>

</table>

---

OBJECTS & IFRAMES

<iframe src="url"></iframe>: Embeds another webpage.

<embed src="file.swf">: Embeds external content (e.g., Flash).


Attributes:

- width, height: Set dimensions.

- src: Source URL.

---

HTML5 TAGS

<header>...</header>: Page or section header.

<footer>...</footer>: Page or section footer.

<article>...</article>: Self-contained content.

<section>...</section>: Thematic grouping of content.

<nav>...</nav>: Navigation links.

<mark>...</mark>: Highlighted text.

---

SPECIAL CHARACTERS

&quot;: "

&amp;: &

&lt;: <

&gt;: >

&nbsp;: Non-breaking space.

&copy;: ©

You might also like