User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
documentation:css [2010/05/20 07:53]
documentation:css [2010/05/20 08:01] (current)
Line 1: Line 1:
 +<WRAP left 40%>
 +<WRAP centeralign 100% bigger>
 +<WRAP bigger fgred>​Lab46 Tutorials</​WRAP>​
 +<WRAP muchbigger>​CSS</​WRAP>​
 +Cascading Style Sheets
 +<WRAP clear></​WRAP>​
 +CSS was adopted in the mid 1990's as a way to standardize web pages. Style sheets can be used with many markup languages such as html, xml, svg and xul. It is used for defining the way a document looks. It accomplishes this by giving attributes (colors, fonts) to the tags in a markup language. Before style sheets all attributes had to be added to each tag individually. This can Be very inefficient for a site that has many pages. A style sheet allows an entire page or site to be standardized. ​
 +===== First Style Sheet =====
 +<code css>
 +    p  {font-size: 50%; font-family:​ sans-serif;​}
 +    h1 {color: red; font-weight:​ bold;}
 +save file as style.css
 +<code html>
 +    <​head>​
 +        <style type= "​text/​css">​
 +            @import "​style.css";​
 +        </​style>​
 +        <​title>​My New Web Page</​title>​
 +    </​head>​
 +    <​body>​
 +        <​h1>​Hello world</​h1> ​
 +        <p>
 +        this is my new web page!
 +        </p>
 +    </​body>​
 +save file as index.html ​
 +view in web browser
 +===== Common Attributes =====
 +  *background-color:​ <​color>;​
 +  *background-image:​ <​url>;​
 +  *font-family:​ <​familyName>;​
 +  *font-size: <​size>;​
 +  *font-weight:​ <​weight>;​
 +  *height: <​length>;​
 +  *margin: <​length>;​
 +  *padding: <​length>;​
 +  *text-align:​ <​left|right|center>;​
 +  *width: <​length>;​
 +===== Links =====
 +  *
documentation/css.txt · Last modified: 2010/05/20 08:01 by triley2