Do Now: Create a page on paper
Take out a blank piece of paper and try to make a basic page using as many of the following tags as you can:
Review: A Basic Page
<html>
<head>
</head>
<body>
<h1>Scott McClure</h1>
<p>Hi! My name is Scott McClure. I am a product manager at Fidessa and a real coffee geek.</p>
</body>
</html>
Review: A Basic Page
<html>
<head>
</head>
<body>
<h1>Scott McClure</h1>
<p>Hi! My name is Scott McClure. I am a product manager at Fidessa and a real coffee geek.</p>
</body>
</html>
Review: A Basic Page
<html>
<head>
</head>
<body>
<h1>Scott McClure</h1>
<p>Hi! My name is Scott McClure. I am a product manager at Fidessa and a real coffee geek.</p>
</body>
</html>
Review: A Basic Page
<html>
<head>
</head>
<body>
<h1>Scott McClure</h1>
<p>Hi! My name is Scott McClure. I am a product manager at Fidessa and a real coffee geek.</p>
</body>
</html>
Review: Parts of a Tag
< |
████ |
|
██████ |
=" |
████ |
" |
> |
Review: Parts of a Tag
< |
████ |
|
██████ |
=" |
████ |
" |
> |
|
name |
|
attribute |
|
value |
|
|
Review: Parts of a Tag
< |
img |
|
src |
=" |
cutebunny.gif |
" |
> |
Parts of a CSS Rule
██████ {
██████=██████
}
Parts of a CSS Rule
selector
██████ {
██████=██████
property value
}
Properties
Define how you want to style.
Common properties:
- color
- background-color
- height
- width
- font-size
Combining it all together!
<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>
Your turn!
Go to this URL: http://bit.ly/tywls-css-example
Try:
- Changing colors
- Adding properties
- Adding rules
- Adding id attributes
Want to learn advanced selectors?
Go to: http://bit.ly/selector-game