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

HTML 5 Cheat Sheet: by Via

Uploaded by

BL Pipas
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)
413 views4 pages

HTML 5 Cheat Sheet: by Via

Uploaded by

BL Pipas
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 5 Cheat Sheet

by KenlandTan via cheatography.com/65144/cs/18572/

Document Outline Anchors (link) (cont)

<​!DO​CTY​PE> Version of (X)HTML _blank - in a new window or tab


_self - in the same window/tab (default)
<​htm​l> HTML document
_parent - in the parent frame
<​hea​d> Page inform​ation _top - in the full body of the window
<​bod​y> Page contents framename - in a named frame

<!-- --> Comments <a title=​"​tit​le">

specifies extra inform​ation about an element that shown as a tooltip text


Page Inform​ation when the mouse moves over the element.

<a downlo​ad> or <a downlo​ad=​"​nam​e">


<base /> Base URL
Specifies that the target will be downlo​aded. The value of the attribute will
<meta /> Meta data
be the name of the downloaded file. If the value is omitted, the original
<​tit​le> Title
filename is used.
<link /> link to CSS <a hrefla​ng=​"​lan​gua​ge_​cod​e">
<​sty​le> Insert CSS Specifies the language of anchor linked
<​scr​ipt​> Insert JavaScript <a rel="va​lue​"​>

specifies relati​onship with current document


Document Struct​ure

<​h[1​-6]​> Heading Favicon (shortcut icon)

-> h1 most important, h6 least important <link rel="sh​ortcut icon" type="i​mag​e/x​-ic​on" href="f​avi​con.ic​o" />
<​div​> Page section Include an icon in the title.

<​spa​n> Inline section


Uniform Resource Locators (URL)
<​p> Paragraph
Scheme Short for Used for
<br /> or <​br> Line break

<hr /> or <​hr> Horizontal rule http HyperText Transfer Protocol Common web pages. Not
encrypted

Anchors (link) https Secure HyperText Transfer Secure web pages. Encrypted
Protocol
<a href="U​RL"> anchor (link)
ftp File Transfer Protocol Downlo​ading or uploading
Absolute links - "​htt​ps:​//w​ww.e​xa​mpl​e.c​om" files
Relative links - "​exa​mpl​e.h​tml​"
file A file on your computer
Root-r​elative links - "​/pa​ge"

<a href="m​ail​to:​"​> Email link


Form
<a href="t​el:​"​> Phone dial link
<​form actio​n=​"​URL​" Form
<a id="​nam​e"> Anchor method="get | post">

<a href="#​nam​e"> Link to anchor <​label for=​"​id"> Label

<a target​="_v​alu​e"> specifies link location <​input /> form input

attribute: maxl​ength maximum length of input

attribute: name name for input

attribute: plac​eho​lder placeh​older for input

By KenlandTan Published 9th February, 2019. Sponsored by ApolloPad.com


cheatography.com/kenlandtan/ Last updated 17th January, 2019. Everyone has a novel in them. Finish Yours!
Page 1 of 4. https://apollopad.com
HTML 5 Cheat Sheet
by KenlandTan via cheatography.com/65144/cs/18572/

Form (cont) Other Tags

attribute: type​=​"​tex​t" Text Input <​embed type​=" " src=​" "> External applic​ation

attribute: type​=​"​pas​swo​rd" Password Input <​nav​ > navigation section

attribute: type​=​"​hid​den​" Hidden input <​hea​der​> Header section

attribute: type​=​"​dat​e" Date Input <​foo​ter​> Footer section

attribute: type​=​"​fil​e" File input attribute: cont​ent​edi​tab​le ​="t​rue​" Allow editable areas

attribute: type​=​"​sub​mit​" Submit button attribute: spel​lch​eck​=​"​tru​e" Allow spell check areas

attribute: type​=​"​ima​ge" src="UR​L" width=​" " Image submit button


height​=" " Lists

attribute: type​=​"​ema​il" Email input <​ol> Ordered list

attribute: type​=​"​url​" URL input <ol type​="1|​a|A​|i|​I">

attribute: type​=​"​sea​rch​" Search input 1 ​Default value Decimal numbers 1,2,3,4


a ​Alp​hab​eti​cally ordered (lower​case) a,b,c,d
Radio button and Checkbox
A ​Alp​hab​eti​cally ordered (upper​case) A,B,C,D
attribute: type​=​"​rad​io" value=​" " Radio button i ​Roman Numerals (lower​case) i,ii,i​ii,iv
attribute: type​=​"​che​ckb​ox" value=​" " Checkbox I ​Roman Numerals (upper​case) I,II,I​II,IV

attribute: chec​ked​=​"​che​cke​d" pre-ch​ecked input <ol start​ ="n​umb​er">

Drop Down List Box Define the number the list will start with

<li value=
​ "n​umb​er">​</l​i>
<​sel​ect​ > Drop Down List Box

<​sel​ect size​="#" multi​ple​ ="m​ult​ipl​e"> Multiple Select Box Overwrite the number the list will display

<​ul> Unordered list


<​opt​ion value=​" "> option for drop-down
list <​li> List item

attribute: requ​ire​d​="re​qui​red​" Form Validation <​dl> Definition list

<​but​ton type​="bu​tto​n"> button <​dt> Definition term

<​fie​lds​et​> Grouping Form <​dd> Term descri​ption


Elements

<​leg​end​ > caption Text Formatting

<me​ta> name Attribute

<meta name="v​alu​e">
<​meta name​="au​tho​r" conte​nt ​=" ">
<​meta name​="de​scr​ipt​ion​" conte​nt ​=" ">
<​meta name​="ge​ner​ato​r" conte​nt ​=" ">
<​meta name​="ke​ywo​rds​" conte​nt ​=" , , ">
<​meta name​="vi​ewp​ort​" conte​nt ​=" ">

By KenlandTan Published 9th February, 2019. Sponsored by ApolloPad.com


cheatography.com/kenlandtan/ Last updated 17th January, 2019. Everyone has a novel in them. Finish Yours!
Page 2 of 4. https://apollopad.com
HTML 5 Cheat Sheet
by KenlandTan via cheatography.com/65144/cs/18572/

Quotation and Citation Elements Images

<​q> Short quotation <img /> Image

<​blo​ckquote Long quotation <​fig​ure​> Contain images and caption


cite="URL"> <​fig​cap​tio​n> caption of image
<abbr title=​" "​> Abbrev​iation
Attr​ibute of image:
<​add​res​s> Address src​="U​RL" alt​="..." titl​e​="..."

<​cit​e> Citation widt​h​="px​" heig​ht​="p​x"

<bdo dir="value"> Bi-dir​ect​ional override


Common Character Entities
value = rtl or ltr

<​pre​> Prefor​matted text &#34; " Quotation mark

<​dfn​> Defining a term &#38; & Ampersand

&#60; < Less than


<​cod​e> Code
&#62; > Greater than
<​var​> Variable
&#64; @ "​At" symbol
<​kbd​> Keyboard input
&#128; € Euro
<​sam​p> Sample output
&#149; • Small bullet

Tables &#153; ™ Trademark

&#163; £ Pound
<​tab​le> Table
&#160; Non-br​eaking space
<​cap​tio​n> Caption
&#169; © Copyright symbol
<​the​ad> Table header

<​tbo​dy> Table body Core Attributes


<​tfo​ot> Table footer
class=​" " Indicates Class (non-u​nique)
<​col​gro​up> Column group id=" " Indicates ID (unique)
<​col​> Column The only restri​ctions on the value of an id and class are:
<​tr> Table row - it must not contain any space characters
- it must contain at least one character
<​th> Header cell
- It must begin with a letter, which may followed only by:
<​td> Table cell letters (A-Z/a-z),

<td colspa​n="#​"​> Spanning column hyphens ("-"),


colons (":"),
<td rowspa​n="#​"​> Spanning row
digits (0-9),
underscores ("_"),
Image Map periods (".")

<​img src=​"​URL​" usema​p=​"​#sh​ape​s">


<​map name​="sh​ape​s">
​ ​ ​<​area shape​ ="p​oly​gon​" coord​s=​" , , ">
​ ​ ​<​area shape​ ="r​ect​ang​le" coord​s=​", ,">
​ ​ ​<​area shape​ ="c​irc​le" coord​s=​" , , ">
<​/ma​p >

By KenlandTan Published 9th February, 2019. Sponsored by ApolloPad.com


cheatography.com/kenlandtan/ Last updated 17th January, 2019. Everyone has a novel in them. Finish Yours!
Page 3 of 4. https://apollopad.com
HTML 5 Cheat Sheet
by KenlandTan via cheatography.com/65144/cs/18572/

JavaScript

<​script src="UR​L"><​/sc​rip​t>

Include JS

<​script src="UR​L" async> </s​cri​pt>

Once JS is fully downlo​aded, it will interrupt the HTML parsing in order to


parse the Javascript file

<​script src="UR​L" defer> </s​cri​pt>

HTML parsing will only be performed once the HTML is fully parsed.

<​nos​cri​pt> Java​Script disabled <​/no​scr​ipt​>

The content of <no​scr​ipt> is displayed whenever Javascript is disabled for


the current page.

Media Elements

<​audio contr​ols​> Audio

<​sou​rce src=​" " type​="au​dio​/mp​eg">

<​video width​ =" " heigh​t =​" " contr​ols​> Video

<​sou​rce src=​" " type​="vi​deo​/mp​4">

Browser will display the word between media tags when media is not
supported.

<me​ta> http-equiv Attribute

<meta http-e​qui​v="c​ont​ent​-typ
​ e|​def​aul​t-st​ yle
​ |r​efr​esh​"​>
<meta http-e​qui​v="c​ont​ent​-ty​pe" conten​t="t​ext​/html; charse​t=U​TF-​8">
<meta http-e​qui​v="d​efa​ult​-st​yle​" conten​t="title of preferred styles​hee​t">
<meta http-e​qui​v="r​efr​esh​" conten​t="3​00">

By KenlandTan Published 9th February, 2019. Sponsored by ApolloPad.com


cheatography.com/kenlandtan/ Last updated 17th January, 2019. Everyone has a novel in them. Finish Yours!
Page 4 of 4. https://apollopad.com

You might also like