0% found this document useful (0 votes)
8 views2 pages

HTML Cheat Sheet

This document is a detailed HTML cheat sheet covering essential elements and tags used in HTML5. It includes sections on document structure, common tags, forms, tables, media tags, semantic elements, input types and attributes, meta tags, links, multimedia, global attributes, HTML entities, accessibility, and deprecated tags. The cheat sheet serves as a quick reference for web developers to understand and utilize HTML effectively.

Uploaded by

redcathackers
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)
8 views2 pages

HTML Cheat Sheet

This document is a detailed HTML cheat sheet covering essential elements and tags used in HTML5. It includes sections on document structure, common tags, forms, tables, media tags, semantic elements, input types and attributes, meta tags, links, multimedia, global attributes, HTML entities, accessibility, and deprecated tags. The cheat sheet serves as a quick reference for web developers to understand and utilize HTML effectively.

Uploaded by

redcathackers
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

HTML Cheat Sheet (Detailed)

1. Document Structure

<!DOCTYPE html> - Declares HTML5 document type


<html> - Root element
<head> - Metadata, links, title
<body> - Visible content

2. Common Tags

<h1> to <h6> - Headings


<p> - Paragraph
<a href="url"> - Anchor/link
<img src="[Link]" alt="desc"> - Image
<ul>, <ol>, <li> - Lists
<br>, <hr> - Line break, horizontal rule

3. Forms

<form> - Form wrapper


<input type="text|email|password|checkbox|radio|submit|file|date">
<textarea></textarea>
<select><option></option></select>
<button>Click</button>
<label for="id">Label</label>

4. Tables

<table>
<tr> - Table row
<th> - Table header
<td> - Table data cell
</table>

5. Media Tags

<img> - Image
<video controls><source src="video.mp4"></video>
<audio controls><source src="audio.mp3"></audio>
<iframe src="..."></iframe>

6. Semantic Elements

<header>, <nav>, <main>, <section>, <article>, <aside>, <footer>, <figure>


Improve SEO and accessibility.
HTML Cheat Sheet (Detailed)

7. Input Types

text, password, email, number, date, range, color, file, checkbox, radio, submit

8. Input Attributes

required, placeholder, value, readonly, disabled, maxlength, minlength, pattern, step, min, max

9. Meta Tags

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="...">
<meta name="author" content="...">

10. Links & Navigation

<a href="url">Link</a>
<a href="#section-id">Jump to section</a>
<nav> - Navigation container

11. Multimedia & Embeds

<embed src="[Link]" type="application/x-shockwave-flash">


<object data="[Link]" type="application/pdf"></object>
<iframe src="..."></iframe>

12. Global Attributes

class, id, style, title, lang, tabindex, hidden, draggable, data-*

13. HTML Entities

&lt; < , &gt; > , &amp; & , &quot; " , &copy; © , &nbsp; (non-breaking space)

14. Accessibility

alt (images), aria-label, role, tabindex, <label> for form inputs

15. Deprecated Tags

<font>, <center>, <bgsound>, <marquee>, <u> - Use CSS instead.

You might also like