Sunday, October 24, 2010

It was very cool learning how to style a web page with html. This is how my exercise turned out!






Introduction to Cascading Style Sheets


HTML is used to create hypertext documents.
HTML defines the different parts of a document such as
headings, paragraphs and enumerated lists.
Cascading Style Sheets, or CSS, define what an HTML
document looks like. CSS defines things such as fonts, colors,
backgrounds, and border styles.

Style Attributes


The STYLE tag in the HEAD tag changes the
style for all the other tags inside the BODY tag. With the
STYLE attribute you can change the style for an individual tag. For example, let's change the color of this paragraph to RED.

And then change the color of this paragraph to BLUE.
To do this, add a STYLE attribute to both of the paragraphs
and set their COLOR property to BLUE for the paragraph
above and RED for this paragraph.

CSS Classes


The STYLE tag in the HEAD tag changes the style for
all the other tags inside the BODY tag. With the CLASS
attribute you can name the styles in the HEAD tag and
then assign those styles to individual tags in the BODY tag.
To illustrate this, let's create a class that aligns the text of
this paragraph to the CENTER, makes the text green, and
bold.

Then create another CLASS that aligns he text of this
paragraph to the RIGHT, makes the text gray, and italic.


CSS Fonts


CSS allows controlling the font of your document.
First you need to choose the font family. Common font
families include: Arial, Tahoma, Impact, and Verdana.
As an example, we will style this paragraph with the
Impact font.

Then you need to choose the style of the font.
Here are some common styles: bold, italic, underline.
As an example, we will style this paragraph with Verdana bold.

Finally we will style the size of this paragraph.

No comments:

Post a Comment