Show Menu
Cheatography

CPSC 1030 Midterm Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Anchor

<a href="_­___­"> </a>

Image

<img src="__­__" alt="__­__">

Unordered List

<ul type="_­___­">
<li> </l­i>
</u­l>

Ordered List

<ol type="_­___­">
<li> </l­i>
</o­l>

Descri­ption List

<dl> </d­l>
Contains the descri­ption list
<dt> </d­t>
Contains a defined term
<dd> </d­d>
Contain a data definition

Table

<ta­ble> </t­abl­e>
Contains the table
<tr> </t­r>
Contains a table row
<td> </t­d>
Contains a table data (cell)
<ca­pti­on> </c­apt­ion>
Configures a descri­ption of the table
<th> </t­h>
Configure Column and Row Headings (centered and bold)
colspan Attribute
Specifies the number of columns that a cell will occupy
rowspan Attribute
Specifies the number of rows that a cell will occupy

Navigation

<na­v> </n­av>

Special Characters

&lt;
<
&gt;
>
&amp;
&
&quot;
"
&copy;
Copyright
 

Dithering

Used to enhance images with low color depth and a limited color palate

Alpha Channel

For RGB images, a fourth channel is added repres­enting the degree of transp­arency (opacity) of the pixel

Lossy Compre­ssion

Lossy compre­ssion means that some data from the original image is lost. Once you have compressed an image this way, you can't go back
Used for video, sound and images where a certain amount of inform­ation loss will not be detected
Using JPEG

Lossless Compre­ssion

Decomp­ressed image is identical to the original image
Works well for simple graphic illust­rations
Works poorly for photog­raphic images

Indexed Color

Technique to manage images' colors in a limited fashion in order to save file storage capacity
Color is not directly defined by the image pixel, but is stored in a separate piece of data called a palette

Color Depth

Number of colors which image can represent

Raster Image

Is a way to represent digital images
Also called a bitmap

Relative Link

Link to pages on your own site

Absolute Link

Link to other web sites, usually with a URL
 

CSS Properties

backgr­oun­d-color
valid color
color
valid color
font-f­amily
valid font or font family
family­-size
numeric value with pt or px or the unit em
font-style
normal, italic, or oblique
font-w­eight
text values normal, bold, bolder, and lighter
letter­-sp­acing
a numeric value or normal
line-h­eight
percentage
margin
numeric value
margin­-left
numeric value, auto, or 0
margin­-right
numeric value, auto, or 0
text-align
center, justify, left, or right
text-d­eco­ration
value "­non­e" will not underline
text-i­ndent
numeric value or percentage
text-s­hadow
2 to 4 numerical values to indicate a horizontal offset, vertical offset, blur radius, and spread distance, and a valid color value
text-t­ran­sform
none, capita­lize, uppercase, lowercase
white-­space
normal, nowrap, pre, pre-line, pre-wrap
width
numeric value, numeric percen­tage, or auto
word-s­pacing
numeric value or normal

Ways to Apply CSS

Inline
In the web page body

Ways to Apply CSS

Inline
In the web page body. Use the style attribute of an HTML tag. Applies only to the specific element enclosed
Embedded
In the web page head section. Uses <st­yle> </s­tyl­e>. Applies style to the entire web page. Used to style a single web page
External
A separate text file

Link CSS

<link rel="st­yle­she­et" type="t­ext­/cs­s" href="_­___­">

Class Selector

Use a class selector when you need to apply a CSS rule to certain elements

id Selector

Used to select one unique element
To select an element with a specific id, write a has (#) character, followed by the id of the element

Descendant Selector

Targets elements that are contained within another elements

div Element

Allows you to group a set of elements together in block-­level box

span Element

Is in-line and usually used for a small chuck of HTML inside a line