You are on page 1of 45

Basic HTML

Tag Description

<!DOCTYPE> Defines the document type

<html> Defines an HTML document

<title> Defines a title for the document

<body> Defines the document's body

<h1> to <h6> Defines HTML headings

<p> Defines a paragraph

<br> Inserts a single line break

<hr> Defines a thematic change in the content

<!--...--> Defines a comment

Formatting
Tag Description

<acronym> Not supported in HTML5. Use <abbr> instead.

Defines an acronym

<abbr> Defines an abbreviation or an acronym

<address> Defines contact information for the author/owner of a


document/article

<b> Defines bold text

<bdi> Isolates a part of text that might be formatted in a


different direction from other text outside it

<bdo> Overrides the current text direction

<big> Not supported in HTML5. Use CSS instead.

Defines big text

<blockquote> Defines a section that is quoted from another source

<center> Not supported in HTML5. Use CSS instead.


Defines centered text

<cite> Defines the title of a work

<code> Defines a piece of computer code

<del> Defines text that has been deleted from a document

<dfn> Represents the defining instance of a term

<em> Defines emphasized text

<font> Not supported in HTML5. Use CSS instead.

Defines font, color, and size for text

<i> Defines a part of text in an alternate voice or mood

<ins> Defines a text that has been inserted into a document

<kbd> Defines keyboard input


<mark> Defines marked/highlighted text

<meter> Defines a scalar measurement within a known range (a


gauge)

<pre> Defines preformatted text

<progress> Represents the progress of a task

<q> Defines a short quotation

<rp> Defines what to show in browsers that do not support


ruby annotations

<rt> Defines an explanation/pronunciation of characters (for


East Asian typography)

<ruby> Defines a ruby annotation (for East Asian typography)

<s> Defines text that is no longer correct

<samp> Defines sample output from a computer program


<small> Defines smaller text

<strike> Not supported in HTML5. Use <del> or <s> instead.

Defines strikethrough text

<strong> Defines important text

<sub> Defines subscripted text

<sup> Defines superscripted text

<time> Defines a date/time

<tt> Not supported in HTML5. Use CSS instead.

Defines teletype text

<u> Defines text that should be stylistically different from


normal text

<var> Defines a variable

<wbr> Defines a possible line-break


Forms and Input

Tag Description

<form> Defines an HTML form for user input

<input> Defines an input control

<textarea> Defines a multiline input control (text area)

<button> Defines a clickable button

<select> Defines a drop-down list

<optgroup> Defines a group of related options in a drop-down list

<option> Defines an option in a drop-down list

<label> Defines a label for an <input> element

<fieldset> Groups related elements in a form

<legend> Defines a caption for a <fieldset> element


<datalist> Specifies a list of pre-defined options for input controls

<keygen> Defines a key-pair generator field (for forms)

<output> Defines the result of a calculation

Frames

Tag Description

<frame> Not supported in HTML5.

Defines a window (a frame) in a frameset

<frameset> Not supported in HTML5.

Defines a set of frames

<noframes> Not supported in HTML5.

Defines an alternate content for users that do not support


frames

<iframe> Defines an inline frame


Images

Tag Description

<img> Defines an image

<map> Defines a client-side image-map

<area> Defines an area inside an image-map

<canvas> Used to draw graphics, on the fly, via scripting (usually


JavaScript)

<figcaption> Defines a caption for a <figure> element

<figure> Specifies self-contained content

<picture> Defines a container for multiple image resources

Audio / Video
Tag Description

<audio> Defines sound content

<source> Defines multiple media resources for media elements


(<video>, <audio> and <picture>)

<track> Defines text tracks for media elements (<video> and


<audio>)

<video> Defines a video or movie

Links

Tag Description

<a> Defines a hyperlink

<link> Defines the relationship between a document and an


external resource (most used to link to style sheets)

<nav> Defines navigation links

Lists
Tag Description

<ul> Defines an unordered list

<ol> Defines an ordered list

<li> Defines a list item

<dir> Not supported in HTML5. Use <ul> instead.

Defines a directory list

<dl> Defines a description list

<dt> Defines a term/name in a description list

<dd> Defines a description of a term/name in a description list

<menu> Defines a list/menu of commands

<menuitem> Defines a command/menu item that the user can invoke


from a popup menu

Tables
Tag Description

<table> Defines a table

<caption> Defines a table caption

<th> Defines a header cell in a table

<tr> Defines a row in a table

<td> Defines a cell in a table

<thead> Groups the header content in a table

<tbody> Groups the body content in a table

<tfoot> Groups the footer content in a table

<col> Specifies column properties for each column within a


<colgroup> element

<colgroup> Specifies a group of one or more columns in a table for


formatting

Styles and Semantics

Tag Description

<style> Defines style information for a document

<div> Defines a section in a document

<span> Defines a section in a document

<header> Defines a header for a document or section

<footer> Defines a footer for a document or section

<main> Specifies the main content of a document

<section> Defines a section in a document

<article> Defines an article


<aside> Defines content aside from the page content

<details> Defines additional details that the user can view or hide

<dialog> Defines a dialog box or window

<summary> Defines a visible heading for a <details> element

<data> Links the given content with a machine-readable


translation

Meta Info

Tag Description

<head> Defines information about the document

<meta> Defines metadata about an HTML document

<base> Specifies the base URL/target for all relative URLs in a


document

<basefont> Not supported in HTML5. Use CSS instead.


Specifies a default color, size, and font for all text in a
document

Programming

Tag Description

<script> Defines a client-side script

<noscript> Defines an alternate content for users that do not support


client-side scripts

<applet> Not supported in HTML5. Use <embed> or <object>


instead.

Defines an embedded applet

<embed> Defines a container for an external (non-HTML) application

<object> Defines an embedded object

<param> Defines a parameter for an object

CSS code
Color Properties

Property Description CSS

color Sets the color of text 1

opacity Sets the opacity level for an element 3

Background and Border Properties

Property Description CSS

background A shorthand property for setting all the background 1


properties in one declaration

background Sets whether a background image is fixed or scrolls 1


- with the rest of the page
attachment

background Specifies the blending mode of each background layer 3


-blend- (color/image)
mode

background Specifies the background color of an element 1


-color
background Specifies one or more background images for an 1
-image element

background Specifies the position of a background image 1


-position

background Sets how a background image will be repeated 1


-repeat

background Specifies the painting area of the background 3


-clip

background Specifies where the background image(s) is/are 3


-origin positioned

background Specifies the size of the background image(s) 3


-size

border Sets all the border properties in one declaration 1

border- Sets all the bottom border properties in one 1


bottom declaration

border- Sets the color of the bottom border 1


bottom-
color
border- Defines the shape of the border of the bottom-left 3
bottom-left- corner
radius

border- Defines the shape of the border of the bottom-right 3


bottom- corner
right-radius

border- Sets the style of the bottom border 1


bottom-
style

border- Sets the width of the bottom border 1


bottom-
width

border- Sets the color of the four borders 1


color

border- A shorthand property for setting all the border-image- 3


image * properties

border- Specifies the amount by which the border image area 3


image- extends beyond the border box
outset
border- Specifies whether the border image should be 3
image- repeated, rounded or stretched
repeat

border- Specifies how to slice the border image 3


image-slice

border- Specifies the path to the image to be used as a border 3


image-
source

border- Specifies the widths of the image-border 3


image-
width

border-left Sets all the left border properties in one declaration 1

border-left- Sets the color of the left border 1


color

border-left- Sets the style of the left border 1


style

border-left- Sets the width of the left border 1


width

border- A shorthand property for setting all the four border-*- 3


radius radius properties

border-right Sets all the right border properties in one declaration 1

border- Sets the color of the right border 1


right-color

border- Sets the style of the right border 1


right-style

border- Sets the width of the right border 1


right-width

border-style Sets the style of the four borders 1

border-top Sets all the top border properties in one declaration 1

border-top- Sets the color of the top border 1


color

border-top- Defines the shape of the border of the top-left corner 3


left-radius
border-top- Defines the shape of the border of the top-right 3
right-radius corner

border-top- Sets the style of the top border 1


style

border-top- Sets the width of the top border 1


width

border- Sets the width of the four borders 1


width

box- Sets the behaviour of the background and border of 3


decoration- an element at page-break, or, for in-line elements, at
break line-break.

box-shadow Attaches one or more drop-shadows to the box 3

Basic Box Properties

Property Description CSS

bottom Specifies the bottom position of a positioned 2


element

clear Specifies which sides of an element where 1


other floating elements are not allowed

clip Clips an absolutely positioned element 2

display Specifies how a certain HTML element should 1


be displayed

float Specifies whether or not a box should float 1

height Sets the height of an element 1

left Specifies the left position of a positioned 2


element

margin Sets all the margin properties in one 1


declaration

margin-bottom Sets the bottom margin of an element 1

margin-left Sets the left margin of an element 1

margin-right Sets the right margin of an element 1


margin-top Sets the top margin of an element 1

max-height Sets the maximum height of an element 2

max-width Sets the maximum width of an element 2

min-height Sets the minimum height of an element 2

min-width Sets the minimum width of an element 2

overflow Specifies what happens if content overflows 2


an element's box

overflow-x Specifies whether or not to clip the left/right 3


edges of the content, if it overflows the
element's content area

overflow-y Specifies whether or not to clip the 3


top/bottom edges of the content, if it
overflows the element's content area

padding Sets all the padding properties in one 1


declaration

padding-bottom Sets the bottom padding of an element 1


padding-left Sets the left padding of an element 1

padding-right Sets the right padding of an element 1

padding-top Sets the top padding of an element 1

position Specifies the type of positioning method used 2


for an element (static, relative, absolute or
fixed)

right Specifies the right position of a positioned 2


element

top Specifies the top position of a positioned 2


element

visibility Specifies whether or not an element is visible 2

width Sets the width of an element 1

vertical-align Sets the vertical alignment of an element 1


z-index Sets the stack order of a positioned element 2

Flexible Box Layout

Property Description CSS

align-content Specifies the alignment between the lines 3


inside a flexible container when the items do
not use all available space

align-items Specifies the alignment for items inside a 3


flexible container

align-self Specifies the alignment for selected items 3


inside a flexible container

flex Specifies the length of the item, relative to 3


the rest

flex-basis Specifies the initial length of a flexible item 3

flex-direction Specifies the direction of the flexible items 3

flex-flow A shorthand property for the flex-direction 3


and the flex-wrap properties
flex-grow Specifies how much the item will grow relative 3
to the rest

flex-shrink Specifies how the item will shrink relative to 3


the rest

flex-wrap Specifies whether the flexible items should 3


wrap or not

justify-content Specifies the alignment between the items 3


inside a flexible container when the items do
not use all available space

order Sets the order of the flexible item, relative to 3


the rest

Text Properties

Property Description CSS

hanging- Specifies whether a punctuation character may be 3


punctuatio placed outside the line box
n

hyphens Sets how to split words to improve the layout of 3


paragraphs
letter- Increases or decreases the space between characters 1
spacing in a text

line-break Specifies how/if to break lines 3

line-height Sets the line height 1

overflow- Specifies whether or not the browser may break lines 3


wrap within words in order to prevent overflow (when a
string is too long to fit its containing box)

tab-size Specifies the length of the tab-character 3

text-align Specifies the horizontal alignment of text 1

text-align- Describes how the last line of a block or a line right 3


last before a forced line break is aligned when text-align is
"justify"

text- Specifies the combination of multiple characters into 3


combine- the space of a single character
upright

text-indent Specifies the indentation of the first line in a text-block 1


text-justify Specifies the justification method used when text-align 3
is "justify"

text- Controls the capitalization of text 1


transform

white- Specifies how white-space inside an element is 1


space handled

word- Specifies line breaking rules for non-CJK scripts 3


break

word- Increases or decreases the space between words in a 1


spacing text

word-wrap Allows long, unbreakable words to be broken and wrap 3


to the next line

Text Decoration Properties

Property Description CSS

text- Specifies the decoration added to text 1


decoration
text- Specifies the color of the text-decoration 3
decoration-
color

text- Specifies the type of line in a text-decoration 3


decoration-
line

text- Specifies the style of the line in a text decoration 3


decoration-
style

text-shadow Adds shadow to text 3

text- Specifies the position of the underline which is set 3


underline- using the text-decoration property
position

Font Properties

Property Description CSS

@font- A rule that allows websites to download and use fonts 3


face other than the "web-safe" fonts
@font- Allows authors to use a common name in font-variant- 3
feature- alternate for feature activated differently in OpenType
values

font Sets all the font properties in one declaration 1

font- Specifies the font family for text 1


family

font- Allows control over advanced typographic features in 3


feature- OpenType fonts
settings

font- Controls the usage of the kerning information (how 3


kerning letters are spaced)

font- Controls the usage of language-specific glyphs in a 3


language typeface
-override

font-size Specifies the font size of text 1

font-size- Preserves the readability of text when font fallback 3


adjust occurs
font- Selects a normal, condensed, or expanded face from a 3
stretch font family

font-style Specifies the font style for text 1

font- Controls which missing typefaces (bold or italic) may be 3


synthesis synthesized by the browser

font- Specifies whether or not a text should be displayed in a 1


variant small-caps font

font- Controls the usage of alternate glyphs associated to 3


variant- alternative names defined in @font-feature-values
alternate
s

font- Controls the usage of alternate glyphs for capital letters 3


variant-
caps

font- Controls the usage of alternate glyphs for East Asian 3


variant- scripts (e.g Japanese and Chinese)
east-
asian

font- Controls which ligatures and contextual forms are used 3


variant- in textual content of the elements it applies to
ligatures
font- Controls the usage of alternate glyphs for numbers, 3
variant- fractions, and ordinal markers
numeric

font- Controls the usage of alternate glyphs of smaller size 3


variant- positioned as superscript or subscript regarding the
position baseline of the font

font- Specifies the weight of a font 1


weight

Writing Modes Properties

Property Description CSS

direction Specifies the text direction/writing direction 2

text- Defines the orientation of the text in a line 3


orientatio
n

text- Specifies the combination of multiple characters into the 3


combine- space of a single character
upright

unicode- Used together with the direction property to set or 2


bidi return whether the text should be overridden to support
multiple languages in the same document

user- Specifies whether the text of an element can be 3


select selected

writing- 3
mode

Table Properties

Property Description CSS

border-collapse Specifies whether or not table borders should 2


be collapsed

border-spacing Specifies the distance between the borders of 2


adjacent cells

caption-side Specifies the placement of a table caption 2

empty-cells Specifies whether or not to display borders 2


and background on empty cells in a table

table-layout Sets the layout algorithm to be used for a 2


table
Lists and Counters Properties

Property Description CSS

counter-increment Increments one or more counters 2

counter-reset Creates or resets one or more counters 2

list-style Sets all the properties for a list in one 1


declaration

list-style-image Specifies an image as the list-item marker 1

list-style-position Specifies if the list-item markers should 1


appear inside or outside the content flow

list-style-type Specifies the type of list-item marker 1

Animation Properties

Property Description CSS

@keyframe Specifies the animation code 3


s
animation A shorthand property for all the animation properties 3
(except animation-play-state and animation-fill-mode)

animation- Specifies a delay for the start of an animation 3


delay

animation- Specifies whether or not the animation should play in 3


direction reverse on alternate cycles

animation- Specifies how many seconds or milliseconds an 3


duration animation takes to complete one cycle

animation- Specifies a style for the element when the animation 3


fill-mode is not playing (when it is finished, or when it has a
delay)

animation- Specifies the number of times an animation should be 3


iteration- played
count

animation- Specifies the name of the @keyframes animation 3


name

animation- Specifies whether the animation is running or paused 3


play-state

animation- Specifies the speed curve of an animation 3


timing-
function

Transform Properties

Property Description CSS

backface-visibility Defines whether or not an element should be 3


visible when not facing the screen

perspective Specifies the perspective on how 3D elements 3


are viewed

perspective-origin Specifies the bottom position of 3D elements 3

transform Applies a 2D or 3D transformation to an 3


element

transform-origin Allows you to change the position on 3


transformed elements

transform-style Specifies how nested elements are rendered 3


in 3D space

Transitions Properties
Property Description CSS

transition A shorthand property for setting the four transition 3


properties

transition- Specifies the name of the CSS property the 3


property transition effect is for

transition- Specifies how many seconds or milliseconds a 3


duration transition effect takes to complete

transition- Specifies the speed curve of the transition effect 3


timing-function

transition- Specifies when the transition effect will start 3


delay

Basic User Interface Properties

Property Description CSS

box-sizing Tells the browser what the sizing properties 3


(width and height) should include

content Used with the :before and :after pseudo- 2


elements, to insert generated content

cursor Specifies the type of cursor to be displayed 2

ime-mode Controls the state of the input method editor 3


for text fields

nav-down Specifies where to navigate when using the 3


arrow-down navigation key

nav-index Specifies the tabbing order for an element 3

nav-left Specifies where to navigate when using the 3


arrow-left navigation key

nav-right Specifies where to navigate when using the 3


arrow-right navigation key

nav-up Specifies where to navigate when using the 3


arrow-up navigation key

outline Sets all the outline properties in one 2


declaration

outline-color Sets the color of an outline 2


outline-offset Offsets an outline, and draws it beyond the 3
border edge

outline-style Sets the style of an outline 2

outline-width Sets the width of an outline 2

resize Specifies whether or not an element is 3


resizable by the user

text-overflow Specifies what should happen when text 3


overflows the containing element

Multi-column Layout Properties

Property Description CSS

break-after Specifies the page-, column-, or region-break 3


behavior after the generated box

break-before Specifies the page-, column-, or region-break 3


behavior before the generated box
break-inside Specifies the page-, column-, or region-break 3
behavior inside the generated box

column-count Specifies the number of columns an element 3


should be divided into

column-fill Specifies how to fill columns 3

column-gap Specifies the gap between the columns 3

column-rule A shorthand property for setting all the 3


column-rule-* properties

column-rule-color Specifies the color of the rule between 3


columns

column-rule-style Specifies the style of the rule between 3


columns

column-rule-width Specifies the width of the rule between 3


columns

column-span Specifies how many columns an element 3


should span across
column-width Specifies the width of the columns 3

columns A shorthand property for setting column-width 3


and column-count

widows Sets the minimum number of lines that must 2


be left at the top of a page when a page
break occurs inside an element

Paged Media

Property Description CSS

orphans Sets the minimum number of lines that must 2


be left at the bottom of a page when a page
break occurs inside an element

page-break-after Sets the page-breaking behavior after an 2


element

page-break-before Sets the page-breaking behavior before an 2


element

page-break-inside Sets the page-breaking behavior inside an 2


element

Generated Content for Paged Media


Property Description CSS

marks Adds crop and/or cross marks to the 3


document

quotes Sets the type of quotation marks for 2


embedded quotations

Filter Effects Properties

Property Description CSS

filter Defines effects (e.g. blurring or color shifting) 3


on an element before the element is displayed

Image Values and Replaced Content

Property Description CSS

image-orientation Specifies a rotation in the right or clockwise 3


direction that a user agent applies to an
image (This property is likely going to be
deprecated and its functionality moved to
HTML)

image-rendering Gives a hint to the browser about what 3


aspects of an image are most important to
preserve when the image is scaled

image-resolution Specifies the intrinsic resolution of all raster 3


images used in/on the element

object-fit Specifies how the contents of a replaced 3


element should be fitted to the box
established by its used height and width

object-position Specifies the alignment of the replaced 3


element inside its box

Masking Properties

Property Description CSS

mask 3

mask-type 3

Speech Properties

Property Description CSS

mark A shorthand property for setting the mark- 3


before and mark-after properties

mark-after Allows named markers to be attached to the 3


audio stream

mark-before Allows named markers to be attached to the 3


audio stream

phonemes Specifies a phonetic pronunciation for the text 3


contained by the corresponding element

rest A shorthand property for setting the rest- 3


before and rest-after properties

rest-after Specifies a rest or prosodic boundary to be 3


observed after speaking an element's content

rest-before Specifies a rest or prosodic boundary to be 3


observed before speaking an element's
content

voice-balance Specifies the balance between left and right 3


channels

voice-duration Specifies how long it should take to render 3


the selected element's content
voice-pitch Specifies the average pitch (a frequency) of 3
the speaking voice

voice-pitch-range Specifies variation in average pitch 3

voice-rate Controls the speaking rate 3

voice-stress Indicates the strength of emphasis to be 3


applied

voice-volume Refers to the amplitude of the waveform 3


output by the speech synthesises

Marquee Properties

Property Description CSS

marquee-direction Sets the direction of the moving content 3

marquee-play- Sets how many times the content move 3


count

marquee-speed Sets how fast the content scrolls 3


marquee-style Sets the style of the moving content 3

You might also like