HTML CSS Reference
HTML CSS Reference
Global
applies to all HTML elements
Attributes
id="id" unique identifier
title="title" information that is displayed in some browsers when mouse pointer is over element
lang="keyword" primary language (from standard abbreviations)
dir="ltr | rtl | auto" direction of text; ltr - left to right; rtl - right to left;
class="class" one or more classes for the element (separated by spaces)
style="style" one or more CSS name-value pairs that apply only to current element
a anchor element ... link to another Web pag or resource
href="filename | url" address of Web page or other resource that opens with link is activated
target="name | _blank |
window or tab where resource opens (_blank - new window)
_self"
other attributes ... rel, media, type
audio inserts an audio clip
autoplay="autoplay |
audio begins playing when page is loaded (without user intervention)
none"
controls="controls |
requests that the browser display its default playback controls
none"
height="#"... width="#" height and width of element (in pixels)
loop="loop | none" restart playback each time it reaches the end of the clip
src="path/filename" path and filename to the audio clip
type="MIME;
specifies the container format and codecs used to encode the file
codecs='codecs'"
other attributes audio, preload
br inserts a line break
col encloses one or more table columns to treat as a unit
span="#" number of columns to include
fieldset used to group related controls on a form; used in conjunction with <legend> tag
form marks all the elements that are part of a form; must include a name and a method (GET or POST)
input denotes an item of data that users can enter
Types: button, checkbox, color, date, month, week, time, datetime, email, file, image,
type="input type"
number, password, radio, range, reset, search, submit, tel, text, url
placeholder="text" text that appears in input box until user begins to type
value="value" the text to be submitted if an element is selected or the text that appears on a button
width (width of text box);
checked (used with option buttons or check boxes to show selected);
name (name of an element);
other attributes autofocus (which elements gets focus);
pattern (specifies an regular expression that a value is checked against)
required (must be filled in)
size (width of an element)
legend caption that displays in the grouping border; used in conjunction with <fieldset> tag
! 1 SYST10049 - Reference
! 2 SYST10049 - Reference
li list item content in an ordered (<ol>) or unordered (<ul>) list
link makes the contents of an external file available
href="filename | url" specifies external file destination
rel="keyword" keyword specifying the type of link
media="media" media for which the linked resource is intended
type="type" MIME type of the linked resource
meta enables passing of information about a Web page to the user agent that opens it
name="name" type of metadata being provided (standard metadata names)
http-equiv="keyword" directions to user agent for Web page handling
content="content" content of the metadata described by the "name" value
ol an ordered list; used in conjunction with <li> tag
section encloses content focused on a common theme
source location and encoding of an audio or video file
src="path/filename" path and filename of an audio or video file
type="MIME; codecs='codecs'" specifies the container format and codecs used to encode the file
style encloses style sheet code
type="type" styling language
table specifies content to present as a table
td specifies the contents of a table data cell
colspan="#" number of columns that a cell spans
rowspan="#" number or rows that a cell spans
textare
specifies a multiline area where a user can enter text
a
cols="value" approximate number of cahracters that should fit across the box (monospace font)
rows="value" specifies how many rows are available for input
th specifies the contents of a table header cell
colspan="#" number of columns that a cell spans
rowspan="#" number or rows that a cell spans
title specifies the text that appears in the title bar or tab of the Web browser
tr encloses table data cells that make up a single table row
ul an unordered list - specifies a list in which the order does not matter; used in conjunction with <li> tag
video inserts a video
autoplay="autoplay | none" video begins playing when page is loaded (without user intervention)
controls="controls | none" requests that the browser display its default playback controls
height="#"... width="#" height and width of element (in pixels)
loop="loop | none" restart playback each time it reaches the end of the clip
poster="path/filename" specifies path and filename to an image that is displayed before video starts
src="path/filename" path and filename to the audio clip
type="MIME; codecs='codecs'" specifies the container format and codecs used to encode the file
other attributes audio, preload
! 3 SYST10049 - Reference
! 4 SYST10049 - Reference
CSS Properties (partial list for Final Exam)
! 6 SYST10049 - Reference