60% found this document useful (5 votes)
1K views

HTML Cheatsheet

1. The document provides a cheat sheet for HTML with commonly used elements and their syntax. 2. It explains the basic structure of an HTML page with the <!DOCTYPE>, <html>, <head>, <title>, and <body> elements. 3. Key elements like headings, paragraphs, links, lists, quotes, and multimedia elements are described along with their opening and closing syntax.
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
60% found this document useful (5 votes)
1K views

HTML Cheatsheet

1. The document provides a cheat sheet for HTML with commonly used elements and their syntax. 2. It explains the basic structure of an HTML page with the <!DOCTYPE>, <html>, <head>, <title>, and <body> elements. 3. Key elements like headings, paragraphs, links, lists, quotes, and multimedia elements are described along with their opening and closing syntax.
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/ 1

<>

♥ iLoveCoding
HTML Cheatsheet
Comprehensive video course on HTML & CSS
https://ilovecoding.org/courses/htmlcss

Commonly used
1 Syntax to write an HTML element 2 Basic markup of every HTML page 3
HTML elements
Opening Tag Attribute and its value
Every element has an (optional) <!DOCTYPE html> <h1> ... <h6>
opening tag with the name Attributes are like options <html lang="en"> <p>
of the element at its start. of an element. Attributes
have value.
....<head> <i> <strong>
........<title>
<a>
............page title here
<name attr="value"> ........</title> <div>
....children ....</head> <span>
</name>
....<body> lists:
Children (optional) ....
<ul> <ol> <li>
Closing Tag Between the opening and ....
closing tags are the children of
A closing tag has the
the element. This can be more
.... page content
name of the element
with a forward slash elements or just plain text. .... goes here Special formatting
"/" before it. .... <blockquote> <pre>
....
<name attr="value"/> ....</body>
multimedia:
</html>
<img /> <video>
Self-Closing Tag
Some elements that do not have children do not need a closing Code Formatting <audio>
tag. In this case a forward-slash "/" is added to the element's For good code formatting,
opening tag to denote a self-closing tag. remember to indent the
children by 2 or 4 spaces. separators:
Some examples of self-closing elements are:
<hr /> <br />
img, br, hr, meta, input ....

By Aziz Ali ~ https://iLoveCoding.org

You might also like