Beruflich Dokumente
Kultur Dokumente
Check it!
s
ie e
l
p g w
p
A an d/ o
or grn xt t
k e r
bc te t de
a
hi he
What style
rules are
applied
here?
Ap
p
yel lies
bck low
g
cen rnd &
te
tex rs
t
Save &
Refresh!
COMMON MISTAKES:
Forgetting a curly brace
Using parentheses or square
brackets instead of curly braces
Typing a colon where you need a
semicolon (or vice versa)
Forgetting to type # characters
where needed
Typing five-digit hex color codes
instead of six-digit codes (#fff66
instead of #ffff66)
Each
section will
need
<div>
</div>
tags
TRY IT
} and #main { }.
4. Add CSS information you want (bckgrnd
colors, text colors) between #main
{ }.
TRY IT Contd
TRY IT Contd
navigation bar
TRY IT Contd
8. Move into the
coding.
</div>
TRY IT Contd
</div>
TRY IT Contd
</div>
<!DOCTYPE html>
<head>
<title>My Title</title>
Heres an outline:
<style type="text/css">
#header { }
#nav { }
#main { }
#h1 { } **you may have this
</style>
</head>
<body>
<div id=header>
<h1>Header info goes here</h1>
</div>
<div id=nav>
My internal links will eventually go here.
</div>
<div id=main>
All my main content goes here text, images, links to other pages, photos, tables
</div>
</body>
</html>
NAVIGATION BAR
navigation area -- likely takes the
most planning
displays links leading to other pages
w/in same site
IMPORTANT DECISIONS:
How many pages do I want in my site?
What will I name those pages?
CSS width:property
Lets you define how wide you want an
element
specify the width in pixels (using px) or in %
% is good when you want to create equal-width
columns
divide 100 by the number of items you want included it
the width to determine the percent width of each
column
For example, to have five items, each would have a
width of 20% (100 divided 5)
Four items?
each would have a width of 25% (100
divided by 4)
Three items?
each would have a width of 33.3%
t
ll
i
w
e
W LE ks. s?
g
B
n
a
i
l tt
TA
ha
W
<a
<tabl
e>
<tr>
<td>
Do the links
work?
ea
20 ch
%
is
id
th
th
es
e
ye file
t? s
ex
is
hy
Do
es
in
m of
er r s.
et lo n
D co tto
bu
Use short,
simple
filenames!
TRY IT!
1. Openlayout.htmlfor editing
in Notepad.
2. Put the cursor inside the
header div, and delete the
placeholder text that
readsHeader content goes
here.
3. With the cursor still in between
the <div id="header"> and
</div><!-- End header -->,
carefully type the following:
<h1 style="margin:0">Lou's
Records</h1>
Why is the margin 0 there?
HTML headings (h1, h2, h3, and so
forth) have some empty margin
space below them
BACKGROUND PHOTOS?
<body background="images.jpg">
Puts the image as the
background
If you dont want it to repeat, put
this CSS Code in your internal styling
sheet:
body{
Image
background-image: image.jpg; choice
background-repeat:no-repeat; Not tiled
background-attachment:fixed; Does not
scroll
background-size: cover;
Fills it
}