Documente Academic
Documente Profesional
Documente Cultură
Technologie Web
HTML et CSS
1
Olivier Martineau
SpreadButton
olivier@sb.am
Alexandre Pauchet
INSA Rouen - Dpartement ASI
BO.B.RC.18, pauchet@insa-rouen.fr
INSA - ASI TechnoWeb : HTML/CSS 2
1. Introduction
2. HTML
3. Les formulaires
4. Les CSS
PLAN
INSA - ASI TechnoWeb : HTML/CSS 3
1996 : HTML 3.2 ajout des tables, des applets (Java), etc.
1998 : HTML 4.01 ajout des feuilles de styles, des frames, etc.
2007 : HTML 5
HISTORIQUE
INSA - ASI TechnoWeb : HTML/CSS 4
Balise de dbut :
<commande[ attribut1=valeur1[ attribut2=valeur2 ...]]> Balise de n : </
commande>
Balise de dbut :
<commande>
Balise de n :
</commande>
Balise autofermante :
<commande />
Des contrles pour les formulaires : calendar, date, time, email, url, search
POURQUOI HTML 5
INSA - ASI TechnoWeb : HTML/CSS 12
Apporte du sens :
<hx></hx> : etc.
<p></p> : paragraphe
<mark></mark> : soulign
<thead></thead> : en tte
<tfoot></tfoot> : lignes
Balise de dbut :
<commande[ attribut1=valeur1[ attribut2=valeur2 ...]]> Balise de n : </
commande>
Balise autofermante :
<commande[ attribut1=valeur1[ attribut2=valeur2 ...]] />
LES ATTRIBUTS
INSA - ASI TechnoWeb : HTML/CSS 18
Les attributs :
src : lURI o se situe limage
alt : courte description de limage
heigth : hauteur de limage en pixels
width : largeur de limage en pixels
Exemple
<img src="debian.png"alt="le logo Debian"/>
Le contenu de llment est celui qui sera afch en tant que lien.
Exemple :
<a href="lienversuneautrepage.html">Texte affich</a>
BALISE LIEN
INSA - ASI TechnoWeb : HTML/CSS 21
CSS 1
CSS 2
CSS3
CSS
INSA - ASI TechnoWeb : HTML/CSS 31
3 faons de lutiliser :
h2 : slecteur
text-color : proprit
red : valeur
On peut mettre plusieurs couples proprit+valeur par slecteur avec les ;
/* Commentaire dans du CSS */
CSS : SYNTAXE
INSA - ASI TechnoWeb : HTML/CSS 33
Texte :
font-size, font-style, font-family, font-weight
Paragraphes :
line-height, text-align, text-indent, text-transform
Blocs :
height, width, margin-right, margin-left, margin-top, margin-
bottom, padding-right, padding-left, padding-top, padding-
bottom, border-style, border-top-width, border-right-width,
CSS : PROPRITS
http://www.w3schools.com/cssref/
INSA - ASI TechnoWeb : HTML/CSS 39
Fonctionnement normal :
dans le ux, les uns en dessous des autres
HTML 5
w2schools : http://www.w3schools.com/html5/
Toutes les balises : http://www.w3schools.com/html5/html5_reference.asp
CSS
w2schools : http://www.w3schools.com/html5/
Balises : http://www.w3schools.com/html5/html5_reference.asp
Lindispensable Firebug !
Validation
W3C (DTD based) : http://validator.w3.org
Validator.ne (non-DTD) : http://html5.validator.nu