Professional Documents
Culture Documents
Chapter 2: Text
Chapter 3: Lists
Chapter 4: Links
Chapter 5: Images
------------------------------Chapter 6: Tables
Chapter 7: Forms
Chapter 8: Extra Markup
Chapter 9: Flash, Video & Audio
------------------------------Chapter 10: HTML5 Layout
* after CSS
Summary
Tables
- The <table> element is used to add tables to a web
page.
- A table is drawn out row by row. Each row is created
with the <tr> element.
- Inside each row there are a number of cells
represented by the <td> element (or <th> if it is a
header).
- You can make cells of a table span more than one row
or column using the rowspan and colspan attributes.
- For long tables you can split the table into a <thead>,
<tbody>, and <tfoot>.
Summary
Forms
- Whenever you want to collect information from
visitors you will need a form, which lives inside a
<form> element.
- Information from a form is sent in name/value pairs.
- Each form control is given a name, and the text the
user types in or the values of the options they select
are sent to the server.
- HTML5 introduces new form elements which make it
easier for visitors to fil in forms.
Summary
Extra Markup
Summary
Audio & Video
- Flash allows you to add animations, video and audio to
the web.
- Flash is not supported on iPhone or iPad.
- HTML5 introduces new <video> and <audio>
elements for adding video and audio to web pages, but
these are only supported in the latest browsers.
- Browsers that support the HTML5 elements do not
all support the same video and audio formats, so you
need to supply your files in different formats to ensure
that everyone can see/hear them.
1.INTRODUCING
- What CSS does
- How CSS works
- Rules, properties, and values
CSS
EXTERNAL CSS
INTERNAL CSS
SELECTORS
& RULES
<h1>Potatoes</h1>
<p id="intro">
There are <i>dozens</i> of different
<b>potato</b> varieties.
</p>
<p>
They are usually described as early,
second early and maincrop potatoes.
</p>
#1 LAST RULE
#2 SPECIFICITY
#3 IMPORTANT
*{
font-family: Arial, Verdana, sans-serif;}
h1 {
font-family: "Courier New", monospace;}
i{
color: green;}
i{
color: red;}
b{
color: pink;}
pb{
color: blue !important;}
pb{
color: violet;}
p#intro {
font-size: 100%;}
p{
font-size: 75%;}
<div class="page">
<h1>Potatoes</h1>
<p>There are dozens of different potato
varieties. </p>
<p>They are usually described as early, second
early and maincrop potatoes. </p>
</div>
INHERITANCE
body {
font-family: Arial, Verdana, sans-serif;
color: #665544;
padding: 10px;}
.page {
border: 1px solid #665544;
background-color: #efefef;
padding: inherit;}
DIFFERENT
VERSION OF CSS
AND BROWSER
QUIRKS
BrowserCam.com
BrowserLab.Adobe.com
BrowserShots.org
CrossBrowserTesting.com
PositionIsEverything.net
QuirksMode.org
SUMMARY
Introducing CSS
2. COLOR
- How to specify colors
- Color terminology and contrast
- Background color
<h1>
NEKI TEKST
</h1>
<h2>
NEKI DRUGI TEKST
</h2>
<p>
NEKI TRECI TEKST
</p>
FOREGROUND COLOR
/* color name */
h1 {
color: DarkCyan;}
/* hex code */
h2 {
color: #ee3e80;}
/* rgb value */
p{
color: rgb(100,100,90);}
<h1>
NEKI TEKST
</h1>
<h2>
NEKI DRUGI TEKST
</h2>
<p>
NEKI TRECI TEKST
</p>
BACKGROUND COLOR
body {
background-color: rgb(200,200,200);}
h1 {
background-color: DarkCyan;}
h2 {
background-color: #ee3e80;}
p{
background-color: white;}
UNDERSTANDING COLORS
p.one {
background-color: rgb(0,0,0);
opacity: 0.5;}
p.two {
background-color: rgb(0,0,0);
background-color: rgba(0,0,0,0.5);}
OPACITY, RGBA
body {
background-color: #C8C8C8;
background-color: hsl(0,0%,78%);}
p{
background-color: #ffffff;
background-color: hsla(0,100%,100%,0.5);}
HUE
SATURATION
LIGHTING
ALPHA
EXAMPLE
SUMMARY
Colors
3.TEXT
- Size and typeface of text
- Bold, italics, capitals, underlines
- Spacing between lines, words, and letters
TYPEFACE
TERMINOLOGY
ISSUES
LICENSING
BROWSER SUPPORT
OS SUPPORT
FONT AS IMAGES
FONT AS FLASH (SIFR)
FONT AS VIDEO (CUFON)
<h1>Briards</h1>
<p class="credits">by Ivy Duckett</p>
<p class="intro">
The <a class="breed"
href="http://en.wikipedia.org/wiki/
Briard">briard</a>
, or berger de brie, is
a large breed of dog traditionally used as
a herder and guardian of sheep...
</p>
SPECIFYING TYPEFACE
body {
font-family: Georgia, Times, serif;}
h1, h2 {
font-family: Arial, Verdana, sans-serif;}
.credits {
font-family: "Courier New", Courier,
monospace;}
body {
font-family: Arial, Verdana, sans-serif;
font-size: 12px;}
h1 {
font-size: 200%;}
h2 {
font-size: 1.3em;}
SIZE OF TYPE
TYPE SCALES
@font-face {
font-family: 'ChunkFiveRegular';
src: url('fonts/chunkfive.eot');}
h1, h2 {
font-family: ChunkFiveRegular, Georgia, serif;}
www.fontsquirrel.com
www.fontex.org
www.openfontlibrary.org
@font-face {
font-family: 'ChunkFiveRegular';
src: url('fonts/chunkfive.eot');
src: url('fonts/chunkfive.eot?#iefix')
format('embedded-opentype'),
url('fonts/chunkfive.woff') format('woff'),
url('fonts/chunkfive.ttf')
format('truetype'),
url('fonts/chunkfive.svg#ChunkFiveRegular')
format('svg');}
UNDERSTANDING
FONT FORMATS
.credits {
font-weight: bold;}
BOLD
credits {
font-style: italic;}
ITALIC
h1 {
text-transform: uppercase;}
h2 {
text-transform: lowercase;}
.credits {
text-transform: capitalize;}
UPPERCASE &
LOWERCASE
.credits {
text-decoration: underline;}
.1 {
text-decoration: none;}
.2 {
text-decoration: overline;}
.3 {
text-decoration: line-through;}
.4 {
text-decoration: blink;}
p{
line-height: 1.4em;}
LEADING
*space between lines
h1, h2 {
text-transform: uppercase;
letter-spacing: 0.2em;}
.credits {
font-weight: bold;
word-spacing: 1em;}
h1 {
text-align: left;}
p{
text-align: justify;}
.credits {
text-align: right;}
.1 {
text-align: center;}
ALIGNMENT
#six-months {
vertical-align: text-top;}
#one-year {
vertical-align: baseline;}
#two-years {
vertical-align: text-bottom;}
VERTICAL ALIGNMENT
h1 {
background-image: url("images/logo.gif");
background-repeat: no-repeat;
text-indent: -9999px;}
.credits {
text-indent: 20px;}
INDENTING TEXT
p.one {
background-color: #eeeeee;
color: #666666;
text-shadow: 1px 1px 0px #000000;}
p.two {
background-color: #dddddd;
color: #666666;
text-shadow: 1px 1px 3px #666666;}
p.three {
background-color: #cccccc;
color: #ffffff;
text-shadow: 2px 2px 7px #111111;}
p.four {
background-color: #bbbbbb;
color: #cccccc;
text-shadow: -1px -2px #666666;}
p.five {
background-color: #aaaaaa;
color: #ffffff;
text-shadow: -1px -1px #666666;}
p.intro:first-letter {
font-size: 200%;}
p.intro:first-line {
font-weight: bold;}
a:link {
color: deeppink;
text-decoration: none;}
a:visited {
color: black;}
a:hover {
color: deeppink;
text-decoration: underline;}
STYLING LINKS
a:active {
color: darkcyan;}
input {
padding: 6px 12px 6px 12px;
border: 1px solid #665544;
color: #ffffff;}
input.submit:hover {
background-color: #665544;}
input.submit:active {
background-color: chocolate;}
RESPODING TO USERS
input.text {
color: #cccccc;}
input.text:focus {
color: #665544;}
ATTRIBUTES
SUMMARY
Text
4.BOXES
- Controlling size of boxes
- Box model for borders, margin and padding
- Displaying and hiding boxes
div.box {
height: 300px;
width: 300px;
background-color: #bbbbaa;}
p{
height: 75%;
width: 75%;
background-color: #0088dd;}
BOX DIMENSIONS
td.description {
min-width: 450px;
max-width: 650px;
text-align: left;
padding: 5px;
margin: 0px;}
LIMITING WIDTH
h2, p {
width: 400px;
font-size: 90%;
line-height: 1.2em;}
h2 {
color: #0088dd;
border-bottom: 1px solid #0088dd;}
p{
min-height: 10px;
max-height: 30px;}
LIMITING HEIGHT
p.one {
overflow: hidden;}
p.two {
overflow: scroll;}
OVERFLOWING CONTENT
BORDER,MARGING
& PADING
p.one {
border-width: 2px;}
p.two {
border-width: thick;}
p.three {
border-width: 1px 4px 12px 4px;}
BORDER WIDTH
BORDER STYLE
p.one {
border-color: #0088dd;}
p.two {
border-color: #bbbbaa #111111 #ee3e80 #0088dd;}
BORDER COLOR
p{
width: 250px;
border: 3px dotted #0088dd;}
SHORTHAND
p{
width: 275px;
border: 2px solid #0088dd;}
p.example {
padding: 10px;}
PADING
p{
width: 200px;
border: 2px solid #0088dd;
padding: 10px;}
p.example {
margin: 20px;}
MARGIN
body {
text-align: center;}
p{
width: 300px;
padding: 50px;
border: 20px solid #0088dd;}
p.example {
margin: 10px auto 10px auto;
text-align: left;}
CENTERING
li {
display: inline;
margin-right: 10px;}
li.coming-soon {
display: none;}
CHANGE INLINE/BLOCK
li {
display: inline;
margin-right: 10px;}
li.coming-soon {
visibility: hidden;}
HIDING BOXES
CSS3:
- BORDER IMAGES
- BOX SHADOWS
- ROUNDED CORNERS
- ELLIPTICAL SHAPES
BONUS
SUMMARY
Boxes