Skip Navigation

HTML Cheat Sheet

The HTML cheat sheet is a one-page A4 printable document, designed to provide a quick reference for HTML. A description of what is on the cheat sheet follows, or if you are impatient, you can go straight to the full size HTML cheat sheet.

In case you didn't already know, there is a complementary CSS Cheat Sheet available as well.

I have been working on this particular cheat sheet for a little over a year. It's been a tough one to put together - partly because of the wealth of information that could be included (a few colours and element attributes being the obvious items), and partly because it is difficult to know what web designers might find useful in an HTML cheat sheet.

Tags

Thumbnail highlighting Tags section.The bulk of the HTML cheat sheet is comprised of the tags themselves. They are split into sections according to their function. Deprecated and formatting tags (e.g. <b>) are not included in the lists. Each tag is accompanied with a description of its purpose, and where relevant is flagged as an "empty" tag.

Common Character Entities

Thumbnail highlighting Character Entities section.There is a more expansive HTML Character Entities Cheat Sheet available, however that is more than many people need (or want), so I have included the most common character entity codes here as well.

Empty Tags

Thumbnail highlighting Empty Tags section.I have called the cheat sheet an HTML Cheat Sheet, however it is a little more complicated than that. HTML is an evolving language, and has passed through several incarnations. Most recently, use of XHTML has become more widespread. This cheat sheet is a useful tag reference for both HTML and XHTML. Empty tags exist within HTML however should not be closed with a trailing slash (i.e. <br />). In XHTML they must be closed. This section lists the empty tags for HTML and XHTML.

Attributes

Thumbnail highlighting Attributes section.Unfortunately, as the overriding principle of the cheat sheets is that they must be an easily printable single page A4 reference, I had far too little space to include all possible attributes for each element (though in future there may be a multi-page version that includes this information, if enough people are interested). However, I did have space to include some of the more important attributes. These sections include those core attributes.

Events

Thumbnail highlighting Events section.Events in HTML allow a developer to add client-side functionality to a page with JavaScript. While inline events are frowned on by those (including myself) who feel behaviour should be separated from content, they are still widely used and included here for that reason, broken down by type.

Download

The cheat sheet is available in two formats, PNG and PDF:

Update: 8 January 2006: The font issue should be resolved. If you were receiving a font error, please re-download the cheat sheet.

And finally, if you like the cheat sheets, and want to say thanks, please consider buying me something from my Amazon Wishlist. Thankyou very much to those who have already hunted it down and sent me something nice - I'm very grateful!

Please note: If you wish to link to the HTML cheat sheet from elsewhere, please link to this page so others find the description, rather than linking directly to the sheet.

82 comments

Nice work
 United States #2: January 5, 2007
Added to http://techcheatsheets.com

Also on digg here:
[redacted]
Although it doesn't matter for HTML, the events should be all lower case for XHTML. See
http://www.w3.org/TR/xhtml1/#h-4.2
Looks good. HTML is the sort of thing most people become fairly familiar with but it is always easy to get hung up on the occasional function.

Reminds me I need to grab your MySQL cheatsheet as well.
Olger901
Netherlands #5: January 7, 2007
Something is wrong with the PDF it tells me that the font ArialRoundedMTBold is missing. I tried both on my server (Win2k3 SP1 EN with Adobe Acrobat Reader 7) and on my own pc (WinXP SP2 NL with Adobe Acrobat Reader 8)
Hi Olger,

The PDF shouldn't be using that font - that's the font used in the logo. I'll re-export it and see if I can correct the bug.
Olger901
Netherlands #7: January 8, 2007
Yes, that would be great, thank you :)
Olger: Should be sorted now. Please let me know if not.
Olger901
Netherlands #9: January 8, 2007
Its fixed, thank you.
Thanks a bunch, sometimes a little reminder is nice :P
 United Kingdom #11: January 14, 2007
A life(time)-saver!

Thanks a lot!
Thanks a bunch!
I just printed most of your sheets, they are very helpful when
you have a memory like a sieve - err - what did i want to write?
Industrial Flooring
United Kingdom #13: January 17, 2007
We are developing our new site and have used lots of your cheat sheets, thanks for the great resource!
Oh my !!
This is the best and awesome Cheat-sheet even i seen.
Tablespork
United States #15: February 1, 2007
Love the cheat sheets! Could you do one for Vi/Vim?
Reinier
Netherlands #16: February 9, 2007
There are some bugs in the PDF version: the euro sign, trademark etc. do not display correctly. The PNG is okay however.
Just a note: You might want to replace anything between &#128; and &#159; with their more-widely-supported Unicode counterparts: &euro; &bull; &trade; or &#8364; &#8226; &#8482; if you want to stick with numeric. Thanks!
Thanks man... this looks great..
Nice sheet. I always find myself refering to your Mod_Rewrite cheat sheet. Very useful!

Andy
Plus it's XHTML which is always nice to see...
great job
Um were do I send the check? Thanks for this nice piece of work.
Dhirendra
Unknown #23: March 16, 2007
Good Work !
These are AWESOME man! I'm downloading all of them. :D
Thanx for these cheat lists, I find them very useful
Pravin
India #26: March 22, 2007
Looks Good !
Ashish Sehra
India #27: March 30, 2007
Gr8 Stuff
I really do love you hack daniels!!
Great cheatsheet. I was looking for one for my wife to help her get the hang of XHTML. I have to reiterate #3 though, the events need to be all lowercase. Other than that, great work man. Thanks.
Those are very good. i just downloaded all of them.
JW
United Kingdom #31: April 18, 2007
Thanks very much - very useful cheat sheets!
Great job, thanks!
Artos, Poland
Poland #33: May 2, 2007
Great Job ! You are Great! Could you make XML, XSL cheat sheet? :)
Brilliant, i struggle with some codes out side the normal Bold, H1 etc and this is perfect!
 United Kingdom #35: May 31, 2007
Another great cheat sheet, thankyou!
 United Kingdom #36: May 31, 2007
^ lol@me typing my URL wrong!
Danny
United States #37: June 8, 2007
Thanks for the great cheat sheets! Very nice, every one of them.
Very useful! Thank you!
James
United Kingdom #39: July 4, 2007
Are you able to let me know what application you use to format your excellent cheat sheets? I'd love to make my own with a similar layout for DirectX 9. Thanks!
Hi James. I use Xara Xtreme.
James
United Kingdom #41: July 4, 2007
Thanks, hopefully I'll have the patience to make my own! So far I have most of yours stuck on my wall, very useful :)
Anonymous
Australia #42: July 10, 2007
dude where is the cheat for wow ???
wendy
United States #43: August 28, 2007
i love the fact that this website really works and yes almost every night i go home and use it sometimes i even wonder if teachers know about this site?
Nice work! Thanks a lot!
Very helpfull your sheets. not to big and good sorted
Your cheat sheets are works of art. Great job
good html codes i liked it i love you
Thankyou for this, it's really useful!
Very useful.. I just printed this out and now it's on my wall above my Screen :) Thanks alot for this
Thanks for making these available Dave, I've posted on my blog TheAdsenseIdiot.com about your blog and the cheat sheets.

Cheers

The Resident Idiot
Darrell N
Unknown #51: November 3, 2007
Well done, and thank you. Why no-one has ever thought of these sheets before is beyond me!
Wow, it's really handy. Very nicely layout. Thanks.
I've just found your sheets, thank you very much they are really useful
Great, very useful cheat sheet. Thanks for your work.
the review zone
Unknown #55: January 19, 2008
amazing, very handy. Thanks for all the cheatsheets.
Nice cheatsheet ! Great Job!
 Russian Federation #57: January 31, 2008
Wow. Very good job
DeusExMachina
United States #58: February 5, 2008
Thanks for the Cheat Sheet! Cant wait to start using them! :) Just out of curiosity - do you offer Java coding as well?
Thansk for the great job!!
Good job on the cheatsheet, you did a good job and its very professional and informative.
hipstershaun
United States #61: March 15, 2008
Dave-
I love the site and the cheat sheets. I wish I had found it sooner. With so much great information in one place it would have saved me a lot of googling.

I am a web design novice and would be very interested in a more detailed two page cheat sheet. It would sure beat flipping between the index and body of books just to be reminded of what I already know.
divx izle
Unknown #62: April 17, 2008
I am a web design novice and would be very interested in a more detailed two page cheat sheet. It would sure beat flipping between the index and body of books just to be reminded of what I already know.
David
China #63: April 25, 2008
very good
santosh
India #64: May 3, 2008
nice work, thanks a lot
Yes. Cheatsheets are always welcome. Use for XHTML only lower cases!
Great stuff man. Major props for making these great cheat sheets.
Nice Work! Thanks for this! ;)
Just what I was looking for. Thanks, Dave.
Nice work. This is really very useful and helpful and something what i was looking for..You have really done an excellent work. This is something which i as a software programer require everyday, so i have stucked it on my wall in my office..Thanks.
Excellent job! I love your cheatsheets. As soon as I get a chance to print them out they're going to make my desk a lot less cluttered with books. If you're planning on revising this sheet, it would be nice to have the different doctype declarations on there too, I hate having to look them up =)
The PDF and the PNG do not download properly for me. At first it looks like it will download, but then the following page loads: "Page Not Found - Sorry, I couldn't find the page you're looking for." It will still let me save the file, but when I try to open it, I get the followign message: Couldn’t open the file. It may be corrupt or a file format that Preview doesn’t recognize." Would love to use this sheet, as all others are very helpful!
Yep, it keeps making redirects until the server finally gives up and shows you a 404 not found.

It happened the same to me when I tried to download one of the cheat sheets.

I bet Apache is extremely angry with Dave right now!
Downloads should be fine now - sorry about that, looks like a third party ad was causing a loop of doom.
Matthew
Unknown #74: October 8, 2008
u r blog Is very nice

thank u r info

it very useful
Hey, just wanted to say thanks for these cheat sheets. Lots of internet sources for learning web design are kind of frustrating, I find your stuff very straight forward and I really appreciate it. I'm also starting to dabble in CSS and perhaps eventually PHP, and I'm sure you'll be helpful with those too. Gonna share your site around a bit I think. :)
On a side note, the comments on your WoW cheat sheet? absolutely hilarious. A real showcase of the WoW community, haha! I play too so I appreciate how short some of their attention spans are.
anyway, thanks!
~Ana
ashish
Unknown #76: December 10, 2008
wow its really helpful.............
Another interesting and easy to understand HTML cheat sheet. Well done, Dave.
These are all great. I am going to keep them all on my desk.
thank's for cheatsheet
can i request cheatsheet for joomla?
ASD
asdasd #80: April 9, 2009
muy buena!!! jaja todos en ingles y yo en español... te agradesco
10!!!
Very nice, I'll test it as soon as possible ;-))
it good.

thank.

Post Your Comment

· Comments with keywords instead of a name have their URLs removed.
· Your email address will not be displayed or shared.

Live Comment Preview

 United States #83: 1 minute ago