User:Wonghk3/Sandbox





<< Previous Chapter Next Chapter >>

Cascading Style Sheets

 * By itself, the only ability that Wikitext has is to place black text on a white background as you see on this page.
 * To give character to the text or any object on a page requires additional coding.
 * The coding we will use is called "Cascading Style Sheets" or "CSS".
 * In the previous chapter you learned about P-tags or ....
 * The figure at the right is an example of an HTML-tag. Notice that this HTML tag begins with and closes with.
 * To apply CSS to Wikitext, we will use use "inline style" coding.

In computer code, the definition of an Attribute is a quality, character, or characeristic ascribed to something; piece of information which determines a string of characters in a display A declaration is an explicit statement of a (desired) condition.

Applying CSS coding in wikitext
 Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 * Here is an example of an inline style applied to some Lorum ipsum text.
 * This example is for changing the size of the font using our paragraph tags.
 * Lets look closely at the inline style code and break it down into pieces. It is not as intimidating as it might appear at first glance.
 * 1) The opening paragraph tag .
 * This coding will increase the size of the font from the default 14 pixels to 20 pixels.
 * Again, to change the size of the font, you need to place this CSS coding within the opening tag as shown in the sample below.

 Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Attributes
eyecolor: blue or hair:  none or height:  six feet If any of these three attributes were put in a tag, the coding would look like this:
 * The combination of property - value is referred to as an attribute.
 * Let's use more familiar terms to perhaps make the concept of attributes with their properties and values more clear.
 * To describe a person we might state their physical attributes in the property: value form:


 * 
 * 
 * 
 * NOTICE: If a property has more than one word the words are separated by a dash. For example font size should be font-size.
 * We will be introducing more attributes throughout these lessons.
 * You can find a list of attributes from W3schools.com
 * Quick NOTE; there are no limits to the number of attributes you can add.

Try these out
 Exercises
 * Take our Lorem ipsum paragraph and change the size of the default font to 20 pixels. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 * Take our Lorem ipsum paragraph and change the size of the default font to 48 pixels. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Check your answers

 Quick Quiz
 * How many attributes can you put in the paragraph tag?
 * A. No more than 5
 * B. No more than 8
 * C. No more than 20
 * D. None of the above


 * What symbol do you use to separate a property from a value?
 * A. Colon
 * B. Semi-colon
 * C. Comma
 * D. All of the above

Check your answers

<< Previous Chapter Next Chapter >>