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

HTML Cheat Sheet

This document is an HTML cheat sheet that outlines major tags, attributes, and their usage in HTML documents. It covers various categories including structure tags, text content tags, list tags, anchor and media tags, table tags, form tags, semantic HTML5 tags, interactive and script tags, and global attributes. Each section provides examples of how to use the tags effectively.

Uploaded by

kexoseb753
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)
0 views2 pages

HTML Cheat Sheet

This document is an HTML cheat sheet that outlines major tags, attributes, and their usage in HTML documents. It covers various categories including structure tags, text content tags, list tags, anchor and media tags, table tags, form tags, semantic HTML5 tags, interactive and script tags, and global attributes. Each section provides examples of how to use the tags effectively.

Uploaded by

kexoseb753
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/ 2

HTML Cheat Sheet - Major Tags, Attributes, and Usage

HTML Structure Tags

<html> - Root element of HTML document (e.g., <html lang="en">)


<head> - Container for metadata (e.g., <head>...</head>)
<title> - Document title in browser tab (e.g., <title>My Page</title>)
<meta> - Metadata like charset, viewport (e.g., <meta charset="UTF-8">)
<link> - Links external files like CSS (e.g., <link rel="stylesheet" href="style.css">)
<script> - Embeds JS or external scripts (e.g., <script src="app.js"></script>)
<style> - Internal CSS (e.g., <style>body {}</style>)

Text Content Tags

<h1> to <h6> - Headings of different levels


<p> - Paragraph
<br> - Line break
<hr> - Horizontal line
<strong>, <b> - Bold text
<em>, <i> - Italic/emphasized text
<u> - Underlined
<mark>, <small>, <del>, <ins>, <sub>, <sup> - Special formatting

List Tags

<ul> - Unordered list


<ol> - Ordered list
<li> - List item
<dl> - Description list
<dt> - Term in description list
<dd> - Description in description list

Anchor and Media Tags

<a> - Hyperlink (e.g., <a href="url">)


<img> - Image (e.g., <img src="img.jpg" alt="desc">)
<audio>, <video> - Media elements
<source> - Source for audio/video
<iframe> - Embed content
<embed> - Embed external resource
HTML Cheat Sheet - Major Tags, Attributes, and Usage

Table Tags

<table>, <tr>, <td>, <th> - Structure a table


<thead>, <tbody>, <tfoot> - Table sections
<caption> - Table title

Form Tags

<form> - Form element with action/method


<input> - Input field (type, name, placeholder)
<textarea>, <select>, <option>, <label> - Form elements
<button> - Button element
<fieldset>, <legend> - Group related fields

Semantic HTML5 Tags

<header>, <footer>, <nav> - Semantic sections


<article>, <section>, <aside>, <main> - Page structure
<figure>, <figcaption> - Media containers
<time>, <summary>, <details> - Time and interactive details

Interactive & Script Tags

<dialog> - Modal dialog


<canvas> - Drawing with JS
<noscript> - Fallback for no-JS

Global Attributes

class, id, style, title, hidden, tabindex, contenteditable, data-*

You might also like