|
|
|
|
|
|
|
|
|
|
|
|
|
|
CSS Crash CourseIf you're not already familiar with HTML, CSS can be very intimidating. Much like moving up from MS Paint to Photoshop; HTML is fairly simple, while CSS has tons of new options and a slightly different way of doing things. This guide can only cover the most basic of information about CSS as a result, but hopefully it can give you enough information to start with.
What is CSS?CSS is shorthand for "Cascading Style Sheets", and it functions as an expansion on basic HTML. If you consider HTML to be a power tool that comes with a few basic attachments to handle basic tasks, you can think of CSS as the accessory pack with all the fancy add-ons to make that tool do a lot of other stuff. What CSS does is modifies the way an HTML tag displays; for example the bold tag could be modified with CSS to be a different color, or display a background highlight. There are literally tons of different things CSS can do, so it is strongly recommended that you look up such resources for more information.
CSS as it applies to your work on this siteWhile there are three forms of CSS (inline, embedded, and external), only two of them can be used with works on the site; inline and embedded. External stylesheets can't be used because they involve linking to a separate file and could present a security risk. However for the purposes of your work on the site, inline and embedded are all you need anyway.
How to apply an inline styleAn inline style is applied to a tag by adding the attribute style="style stuff here". For example, entering "<div style="color:red; text-decoration:underline;">This is red and underlined.</div> will display in the browser like this:
This is red and underlined. Of particular importance in CSS are the colons and semi-colons. Each style has a property such as color, font-family, font-size, background-color, and so on. After the property is named, you have to use a colon (:) to separate it from whatever the setting will be, and then it has to be closed with a semi-colon (;), such as color:red; or background-color:#FFFFFF; or text-align:center; and so on. How to write and apply an embedded styleThere are two different types of embedded styles you can write; styles that apply to all instances of a specific type of tag, and style classes that can be applied to any tag. The only real difference between the two is how they're written in the stylesheet box in the story/quiz editors.
b { font-family: Arial; color:red; } .style1 { text-align:center; font-weight:bold; } What are all my options with CSS?Too many to list them all here, there are many, MANY options you can utilize using CSS. You can change fonts, font sizes, colors, background colors or images, alignment on the page... the list of all possible CSS attributes is extensive. As with basic HTML, there are a number of resources online with lists of CSS options and tutorials on using them.
|