html [mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · dates 1992:1,000,000...

65
<HTML> </HTML>

Upload: vuongnguyet

Post on 26-Mar-2018

221 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

<HTML>

</HTML>

Page 2: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Présentation

� Partie I: Internet: un ensemble de systèmes d'information en ligne

Partie II: Sites web avec HTML / � Partie II: Sites web avec HTML / XHTML et CSS

Page 3: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

1980

Internet à la fin des années 1980 était un ensemble de réseaux qui peuvent communiquer les uns avec les autres dans le cadre du protocole TCP / IP.

Son utilisation était encore largement limité à l'éducation, le Son utilisation était encore largement limité à l'éducation, le gouvernement et les organismes scientifiques.

Deux développements ont déterminé la croissance explosive de l’Internet dans 1990. Le premier a été l'augmentation rapide des PC (en privé et business). L'autre a été la conception et le développement du World Wide Web.

Curtis, G. Business Information Systems, Addison Wesley 1998

Page 4: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Dates

� 1992: 1,000,000 utilisateurs de Web connecté a l’Internet et WWW

� 1993: White House, UK Government, United Nations, World Bank en ligne

� 1993/94 Utilisation commerciale: transactions par carte de créditcarte de crédit

� 1995: Netscape, Internet Explorer – video, audio etc.

� 1995: 40-50,000,000 utilisateurs

Page 5: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Systèmes d'information en ligne …

� Internet: Système d'information en ligne

� Impact sur tous les aspects de notre vie:

Travail

Education Education

Shopping

Divertissement

Voyager

etc etc

Page 6: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Qu'est-ce que l'information?

� Information

� Les données traitées

� Les données qui sont organisées, significatives et utiles

� L'information dans l'ordinateur :

� Stockée

� Traitée

� Sous une forme qui « peuvent être » utile

Page 7: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Qu'est ce qu'un système d'information?

� Systèmes d'information

� Système informatique qui gère et fournit l'accès à

l'information

� Systèmes d'information grande échelle:� Systèmes d'information grande échelle:

� Systèmes bancaires

� Système de réservation hôtel

� Systèmes de gestion de l'information

� Systèmes informatiques dans une entreprise qui fournissent

des informations sur les activités

Page 8: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Les sites Web sont des systèmes d'information

� World-Wide Web [WWW]

� N'est pas l'Internet, seulement une partie � WWW est un service d'information hypermédia

� Toutes les ressources et les utilisateurs pour le protocole de transfert hypertexte [http]

Hypertexte: référencement � Hypertexte: référencement

� “The World Wide Web is the universe of network-accessible information, an embodiment of human knowledge”

Sir Tim Berners Lee.

Page 9: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Web Information Systems

Systèmes d'information ont toujours utilisé le modèle client-serveur.

Client: navigateur Web standard Réseau: Internet

(ou un intranet local) Serveurs: serveurs Web

inte

rnet

Page 10: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Web

� Omniprésent, accessible partout.

PCfrigo

PDA

DTV

Page 11: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Quelle technologie derrière?

� La clé du succès de l'Internet - les normes:

� Normes:

� TCP / IP (Transmission Control Protocol / Internet Protocol)

� DNS (Domain Name System) � DNS (Domain Name System)

� Key Web standards:

� HTTP (Hypertext Transfer Protocol)

� URL / URI (Uniform Resource Locator / Identifier)

� HTML (Hypertext Markup Language)

Page 12: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Protocoles

� TCP/IP: Transmission Control Protocol/Internet Protocol� Définissent les règles pour l'échange de données de

base sur l’Internet

� La plupart des autres protocoles s'appuient sur le protocole TCP / IP pour la transmission de leurs données protocole TCP / IP pour la transmission de leurs données

� Pour se connecter à l'Internet, un ordinateur a besoin d'un logiciel qui implémente les protocoles TCP / IP

internet

Page 13: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

TCP/IP� TCP/IP- deux couches:TCP / IP est un programme de deux

couches:

� La couche supérieure: Transmission Control Protocol gère le

découpage d'un message ou un fichier en petits paquets qui

sont transmis sur Internet et reçues par une couche TCP qui

rassemble les paquets dans le message original rassemble les paquets dans le message original

� La couche inférieure: Internet Protocol gère la partie adresse de

chaque paquet (adresse IP). Chaque ordinateur sur le réseau

vérifie cette adresse pour transmettre le message.

Page 14: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Adresses IP

� Chaque machine sur l'Internet - une adresse unique appelée adresse IP

� Les adresses IP: nombres de 32 bits, normalement Les adresses IP: nombres de 32 bits, normalement exprimée sous forme de 4 octets dans un nombre décimal à points

216.27.61.137

Page 15: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Domain Name Service [DNS]

� DNS Domain Name Service: Chaque ordinateur sur Internet a un nom unique, utilisée pour référer à l'ordinateur:Www.amazon.co.uk, www.abdn.ac.uk

� Chaque ordinateur sur Internet possède également une adresse IP unique, utilisé par TCP / IP pour transmettre ces données DNS (DNS Software)

Page 16: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

DNS & IP

http://www.iutmontp.univ-montp2.fr/ www.amazon.com

Host Name

internet

162.38.221.50 204.016.127.04

Internet Protocol [IP] Address

Page 17: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Standards I

� HTTP Hyper Text Transfer Protocol

� Utilisé pour la communication entre les clients Web et serveurs Web clients Web et serveurs Web

� Pour demander une page Web, un navigateur envoie un message HTTP GET

� Pour envoyer des données vers un serveur Web, un navigateur peut utiliser un message HTTP POST

Page 18: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Standards II

� URL=Uniform Resource Locator

� URI=Uniform Resource Identifier: � Une manière commune de se référer à n'importe quelle page

Web, n'importe oùWeb, n'importe où

� Format… Protocol://web_server_name/page_name

� Example…http://www.iutmontp.univ-montp2.fr/index.html

� URL / URI sont utilisés en conjonction avec HTTP pour obtenir soit une URL soit des données POST sur une URL

Page 19: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Tim Berners-Lee's Browser

http://inventors.about.com/od/computersoftware/a/html.htm

Page 20: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Le plus ancien HTML sur le web

� 13 Novembre 1990 "Last-Modified: Wed, 13 nov 1990 15:17:00 GMT". GMT".

� La page est encore fonctionnelle dans la plupart des navigateurs Web modernes, et contient même un HyperLink fonctionnel!

http://infomesh.net/html/history/early/

Page 21: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Le plus ancien HTML sur le web

Page 22: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

HMTL

� Des balises pour le contenu d'une page

web.

Head / body:� Head / body:

<html>

<head>

</head>

<body>

</body>

</html>

Page 23: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Balises?

� Utilisées pour marquer le début et la fin d'un élément en

HTML

� Toutes les balises ont le même format:

� commencent par un signe inférieur "<"

� terminent par un signe supérieur ">".

� Deux types de tags

� balise d'ouverture: <html>

� balises de fermeture: </ html>.

� Différence entre une balise d'ouverture et une balise de

fermeture est la barre oblique "/".

Page 24: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Balises (tags) pour:

� Page Title

� Headings

� Paragraphs� Paragraphs

� Bold & italic text

� Lists

� Images

� Links

Page 25: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

First (not very interesting) Page

<html>

<head>

</head></head>

<body>

</body>

</html>

Page 26: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Your First Page

Page 27: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Add a page title…

<html><head>

<title>This is a page title</title>

</head></head>

<body>

</body>

</html>

Page 28: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Now with a title…

Page 29: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Add a Heading…

<html><head>

<title>This is a page title</title>

</head></head>

<body>

<h1>A heading On My First Webpage</h1>

</body>

</html>

Page 30: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Here’s A Heading…

Page 31: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Some content…

<html>

<head>

<title>Example</title>

</head></head>

<body>

<h1>A heading On My First Webpage</h1>

<p>Here is some text in a paragraph</p>

<p>Here is the next paragraph</p>

</body>

</html>

Page 32: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Some content…

Page 33: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Write paragraphs without <p></p>?

<html>

<head>

<title>Example</title>

</head>

<body><body>

<h1>A heading On My First Webpage</h1>

Here is some text in a paragraph

Here is the next paragraph

</body>

</html>

Page 34: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Write paragraphs without <p></p>?

Page 35: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Bold and italic text to paragraphs?

<html>

<head>

<title>Example</title>

</head></head>

<body>

<h1>A heading On My First Webpage</h1>

<p>Here is some <b>text in a paragraph</b></p>

<p>Here is the <i>next paragraph</i></p>

</body>

</html>

Page 36: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Bold and italic text to paragraphs?

Page 37: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Nested tags

<html>

<head>

<title>Example</title>

</head></head>

<body>

<h1>A heading On My First Webpage</h1>

<p>Here is some <b>text in a paragraph</b></p>

<p>Here is the <i>next paragraph</i></p>

</body>

</html>

Page 38: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Adding a list to your page

<html>

<head>

<title>Example</title>

</head>

<body>

<h1>A heading On My First Webpage</h1><h1>A heading On My First Webpage</h1>

<p>Here is some <b>text in a paragraph</b></p>

<p>Here is the <i>next paragraph</i></p>

<ul>

<li>First item</li>

<li>Second item</li>

<li>Third item</li>

</ul>

</body>

</html>

Page 39: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Adding a list to your page

Page 40: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

What about an ordered list?

<html>

<head>

<title>Example</title>

</head>

<body>

<h1>A heading On My First Webpage</h1><h1>A heading On My First Webpage</h1>

<p>Here is some <b>text in a paragraph</b></p>

<p>Here is the <i>next paragraph</i></p>

<ol>

<li>First item</li>

<li>Second item</li>

<li>Third item</li>

</ol>

</body>

</html>

Page 41: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

What about an ordered list?

Page 42: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

HTML can be more than just text<html>

<head>

<title>Example</title>

</head>

<body>

<h1>A heading On My First Webpage</h1>

<p>Here is some <b>text in a paragraph</b></p><p>Here is some <b>text in a paragraph</b></p>

<p>Here is the <i>next paragraph</i></p>

<ol>

<li>First item</li>

<li>Second item</li>

<li>Third item</li>

</ol>

<img src="snowhead.jpg"/>

</body>

</html>

Page 43: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

HTML: more than just text

Page 44: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Links to other pages

How to specify a link:How to specify a link:

<a href=“LINK_LOCATION">LINK TEXT</a>

Page 45: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Links to other pages

<html>

<head>

<title>Example</title>

</head>

<body>

<h1>A heading On My First Webpage</h1><h1>A heading On My First Webpage</h1>

<p>Here is some <b>text in a paragraph</b></p>

<p>Here is the <i>next paragraph</i></p>

<ol>

<li>First item</li>

<li>Second item</li>

<li>Third item</li>

</ol>

<img src="snowhead.jpg"/>

<a href="http://fr.wikipedia.org/wiki/CSD">CSD Homepage</a>

</body>

</html>

Page 46: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Links to other pages

Page 47: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Adding in a line break<html>

<head>

<title>Example</title>

</head>

<body>

<h1>A heading On My First Webpage</h1>

<p>Here is some <b>text in a paragraph</b></p><p>Here is some <b>text in a paragraph</b></p>

<p>Here is the <i>next paragraph</i></p>

<ol>

<li>First item</li>

<li>Second item</li>

<li>Third item</li>

</ol>

<img src="snowhead.jpg"/>

<br/>

<a href="http://fr.wikipedia.org/wiki/CSD">CSD Homepage</a>

</body>

</html>

Page 48: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Links to other pages

Page 49: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Some more text effects

<html>

<head>

<title>Example</title>

</head>

<body>

<h1>A heading On My First Webpage</h1>

<p>Here is some <b>text in a paragraph</b></p>

<p>Here is the <i>next paragraph</i></p><p>Here is the <i>next paragraph</i></p>

<img src="snowhead.jpg"/>

<br/>

<a href=" http://fr.wikipedia.org/wiki/CSD ">CSD Homepage</a>

<br/>

<u>some underlined text</u>

<br/>

<tt>Typewriter type text</tt>

<br>

<small>some small text</small>

</body>

</html>

Page 50: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Some more text effects

Page 51: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Space between pieces of text?

<html>

<head>

<title>Example</title>

</head>

<body>

<h1>A heading On My First Webpage</h1>

<p>Here is some <b>text in a paragraph</b></p><p>Here is some <b>text in a paragraph</b></p>

<p>Here is the <i>next paragraph</i></p>

<img src="snowhead.jpg"/>

<br/>

<a href=" http://fr.wikipedia.org/wiki/CSD ">CSD Homepage</a>

<br/>

<u>some underlined text</u>

<br/>

<tt>Typewriter type text</tt>

<p>I want a space between here and here</p>

</body>

</html>

Page 52: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Space between pieces of text?

Page 53: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Use &nbsp; Non-Breaking space

<html>

<head>

<title>Example</title>

</head>

<body>

<h1>A heading On My First Webpage</h1>

<p>Here is some <b>text in a paragraph</b></p><p>Here is some <b>text in a paragraph</b></p>

<p>Here is the <i>next paragraph</i></p>

<img src="snowhead.jpg"/>

<br/>

<a href="http://www.csd.abdn.ac.uk">CSD Homepage</a>

<br/>

<u>some underlined text</u>

<br/>

<tt>Typewriter type text</tt>

<p>I want a space between here &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and here</p>

</body>

</html>

Page 54: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Use &nbsp; Non-Breaking space

Page 55: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Taking control of your text

<div align="left">aligned to left</div>

<div align="center">aligned to centre</div>

<div align="right">aligned to right</div>

Note the American spelling of center is used.� Note the American spelling of center is used.

� Note that <div align="center">…</div> is now used in favour of the old [and deprecated]

Page 56: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Taking control of your text

Page 57: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Manipulating images on page

� The <img/> tag is used to display an image. There are several attributes that the user can define.

� src source image [URI or the filename]

� alt alternative text � alt alternative text

� height in pixels

� width in pixels

� align to the left, right, top, middle or bottom.

� Specifying the height and width attributes enables faster downloads

Page 58: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

HTML below

Page 59: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Not very well written!

<html><head>

<TITLE>This bit goes in the titlebar</title>

<h1>This is the heading of the page

<i>

No closing </head> tag

CAPITALS

<i>

<p>This is a paragraph

</i></P>

</p>This is another paragraph

</BODY>

</html>

Tags not nested

properly

No opening </body> tag

Page 60: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

W3C

� W3C:

� Industry consortium to promote standards for the web

� XHTML 1.0:

� Introduced in January 2000

� XHTML – based on XML, not SGML

� Same strict syntax as XML

Page 61: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

Previous HTML example…

<html>

<head>

<TITLE>This bit goes in the titlebar</title>

<h1>This is the heading of the page

<i><i>

<p>This is a paragraph

</i></P>

</p>This is another paragraph

</BODY>

</html>

Page 62: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

…redone as XHTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"

lang="en">

<head>

<title>This bit goes in the titlebar</title><title>This bit goes in the titlebar</title>

</head>

<body>

<h1>This is the heading of the page</h1>

<p><i>This is a paragraph

</i></p>

<p>This is another paragraph</p>

</body>

</html>

Page 63: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

So what it means is…

� Your well-defined XHTML document� Can be read correctly by a multitude of

browsers

� PC based, palm, mobile phone etc.� PC based, palm, mobile phone etc.

� Be read and interpreted by users with disabilities etc.

� You’ve written some nicely formed documents!

Page 64: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

In the content itself

� In the actual HTML code itself:� XHTML elements must be properly

nested

� XHTML elements must always be closed� XHTML elements must always be closed

� XHTML elements must be in lowercase

� XHTML documents must have one root element

� Attribute Names Must Be In Lower Case

� Attribute Values Must Be Quoted

Page 65: html [Mode de compatibilit ]) - lirmm.frcroitoru/teaching/html.pdf · Dates 1992:1,000,000 utilisateurs de Web connectéa l’Internet et WWW 1993: White House, UK Government, United

How do I know if is good XHTML?

� http://validator.w3.org/

� Check your XHTML

for errors