Intro to:
HTML
Tag syntax
Author/browse our first HTML page
References & Examples
HTML activity + sharing
CSS
3 types
Rule syntax
References & Examples
Link our web page to a css doc
<tag>Content</tag>
<pizza>
<topping>pineapple</topping>
<topping>ham</topping>
<topping>cheese</topping>
</pizza>
<tag attribute="value">Content goes here</tag>
<img src="path/to/image/file.jpg" alt="description" />
attribute
value
attribute
value
<h1>This is a Heading</h1>
opening tag
closing tag
self closing
<!DOCTYPE html>
<html>
<head>
<title>Page title goes here</title>
</head>
<body>
Content goes here!
</body>
</html>
TTS / HTML
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi nec metus justo. Aliquam erat volutpat.
<!DOCTYPE html>
<html>
<head>
<title>My first awesome web page</title>
</head>
<body>
<h1>Jaime's Page</h1>
<p>A simple page put together using HTML!</p>
</body>
</html>
Save as: myfirstwebpage.html
* No spaces! Dashes or underscores are OK :)
Open up Sublime and let's play around with some HTML.
Create a brand new page called travel.html
Open a new file in Sublime and save it as list.html
Create a basic html page with a heading + an unordered list of 5 of your favorite restaurants.
Open your page in Chrome and holler!
<!DOCTYPE html>
<html>
<head>
<title>My favorite restaurants</title>
</head>
<body>
<h1>My faves</h1>
<ol>
<li>2 Urban Licks</li>
<li>Victory Sandwich</li>
<li>JCT Kitchen</li>
<li>Bar Taco</li>
<li>Antico</li>
</ol>
</body>
</html>
<p style="color:red;">This is my snazzy red paragraph!</p>
<p>This paragraph will not be red.</p>
h1 { color: gray; }
selector
{ declaration block }
property
value
* Internal and external stylesheets
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
font-size:50px;
text-align: center;
}
</style>
</head>
<body>
<h1>This is my huge headline</h1>
<p>Supporting paragraph. Very informative.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="assets/stylesheets/styles.css">
</head>
<body>
<p>This is my snazzy red paragraph!</p>
</body>
</html>
body {
width: 1000px;
margin: auto;
}
p {
color: red;
text-align: center;
}
HTML
CSS
p {
color: yellow;
text-align: center;
}
<p>
Something Awesome!
</p>
#top {
background:gray;
text-align:center;
}
<div id="top">
Something Awesome!
</div>
.blue-text {
color: blue;
text-decoration: none;
}
<p class="blue-text">
Something Awesome!
</p>
<p class="blue-text">
Something else awesome!
</p>
Open a new file in Sublime and save it as list-styles.css
Change the color of your unordered list of 5 restaurants with an element selector.
Change your favorite to a different color with a class selector.
Share with the class!
<!DOCTYPE html>
<html>
<head>
<title>My favorite restaurants</title>
<link rel="stylesheet" href="assets/stylesheets/list-styles.css">
</head>
<body>
<ul>
<li>2 Urban Licks</li>
<li>Victory Sandwich</li>
<li>JCT Kitchen</li>
<li>Bar Taco</li>
<li class="fave">Antico</li>
</ul>
</body>
</html>
li {
color: blue;
}
.fave{
color: red;
}
HTML
list.html
CSS
list-styles.css
Download and install Chrome at chrome.com
Most developers use Chrome because it comes pre-installed with a set of developer tools that make debugging and troubleshooting easier.
Create a 2 page personal website
index.html
about.html