On Github mccluresc / scripted-css
Take out a blank piece of paper and try to make a basic page using as many of the following tags as you can:
<Frog/> <Frog/> <Frog/> <Frog/> <Frog/> <Frog/> <Flower/> <Flower/> <Flower/> <Lillipad/>
<Frog id="Smiley"/> <Frog id="Timmy"/> <Frog id="BradPitt"/> <Frog id="Keisha"/> <Frog id="Baby"/> <Frog id="Sleepy"/> <Flower id="left"/> <Flower id="center"/> <Flower id="right"/> <Lillipad/>
<Frog id="Smiley"/> <Frog id="Timmy"/> <Frog id="BradPitt"/> <Frog id="Keisha"/> <Frog id="Baby"/> <Frog id="Sleepy"/> <Flower id="left"/> <Flower id="center"/> <Flower id="right"/> <Lillipad/>
"id" attribute identifies a specific tag. Must be unique.
<Frog id="Smiley"/> <Frog id="Timmy"/> <Frog id="BradPitt"/> <Frog id="Keisha"/> <Frog id="Baby"/> <Frog id="Sleepy"/> <Flower id="left"/> <Flower id="center"/> <Flower id="right"/> <Lillipad/>
#Smiley { color: purple; } #Timmy { color: green; } #BradPitt { color: lavender; } #Keisha { color: blue; } #Baby { color: pink; } #Sleepy { color: tan; }
<Frog id="Smiley"/> <Frog id="Timmy"/> <Frog id="BradPitt"/> <Frog id="Keisha"/> <Frog id="Baby"/> <Frog id="Sleepy"/> <Flower id="left"/> <Flower id="center"/> <Flower id="right"/> <Lillipad/>
frog { color: green; } flower { color: red; } lillipad { color: lightgreen; }
<Frog class="top" id="Smiley"/> <Frog class="middle" id="Timmy"/> <Frog class="middle" id="BradPitt"/> <Frog class="bottom" id="Keisha"/> <Frog class="bottom" id="Baby"/> <Frog class="bottom" id="Sleepy"/> <Flower id="left"/> <Flower id="center"/> <Flower id="right"/> <Lillipad/>
<Frog class="top" id="Smiley"/> <Frog class="middle" id="Timmy"/> <Frog class="middle" id="BradPitt"/> <Frog class="bottom" id="Keisha"/> <Frog class="bottom" id="Baby"/> <Frog class="bottom" id="Sleepy"/> <Flower id="left"/> <Flower id="center"/> <Flower id="right"/> <Lillipad/>
"class" attribute identifies similar tags. May be used on multiple tags.
<Frog class="top" id="Smiley"/> <Frog class="middle" id="Timmy"/> <Frog class="middle" id="BradPitt"/> <Frog class="bottom" id="Keisha"/> <Frog class="bottom" id="Baby"/> <Frog class="bottom" id="Sleepy"/> <Flower id="left"/> <Flower id="center"/> <Flower id="right"/> <Lillipad/>
frog .bottom { color: green; } frog .middle { color: purple; } frog .top { color: blue; } flower { color: red; } lillipad { color: lightgreen; }
██████ { ██████=██████ }
selector██████ { ██████=██████ property value }
#myPicture { height: 200; width: 100; }
.friendPictures { height: 150; width: 75; }
p { color: red; }
Define how you want to style.
Common properties:
<html> <head> <style> body { background-color: green; } h1 { color: red; font-size:20px; } p { color: blue; font-size:12px; } </style> </head> <body> <h1>My awesome page!</h1> <p>Some really colorful text.</p> </body> </html>
Go to this URL: http://bit.ly/tywls-css-example
Try:
Want to learn advanced selectors?
Go to: http://bit.ly/selector-game