was kann html? einleitung einleitung bsp main title first subtitle

Post on 05-Apr-2015

123 Views

Category:

Documents

4 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Was kann HTML?

EINLEITUNG

<HTML> <HEAD></HEAD> <BODY></BODY></HTML>

EINLEITUNG

<HTML> <HEAD> <TITLE>Bsp</TITLE> </HEAD> <BODY> <H1>Main Title</H1> <H2>First Subtitle</H2> </BODY></HTML>

EINLEITUNG

<HTML> <HEAD> <TITLE>Bsp</TITLE> </HEAD> <BODY> <H1>Main Title</H1> <H2>First Subtitle</H2> </BODY></HTML>

EINLEITUNG

<HTML> <HEAD> <TITLE>Bsp</TITLE> </HEAD> <BODY> <H1>Main Title</H1> <P>This is only an example text to show how a HTML- Document might look like.</P> <H2>First Subtitle</H2> </BODY></HTML>

EINLEITUNG

<HTML> <HEAD> <TITLE>Bsp</TITLE> </HEAD> <BODY> <H1>Main Title</H1> <P>This is only an example text to show how a HTML- Document might look like.</P> <H2>First Subtitle</H2> </BODY></HTML>

EINLEITUNG

<HTML> <HEAD> <TITLE>Bsp</TITLE> </HEAD> <BODY> <H1>Main Title</H1> <P>This is only an example text to show how a HTML- Document might look like.</P> <H2>First Subtitle</H2> <TABLE> <TR><TD>product 1</TD></TR> <TR><TD>product 2</TD></TR> <TR><TD>product 3</TD></TR> </TABLE> </BODY></HTML>

EINLEITUNG

<HTML> <HEAD> <TITLE>Bsp</TITLE> </HEAD> <BODY> <H1>Main Title</H1> <P>This is only an example text to show how a HTML- Document might look like.</P> <H2>First Subtitle</H2> <TABLE> <TR><TD>product 1</TD></TR> <TR><TD>product 2</TD></TR> <TR><TD>product 3</TD></TR> </TABLE> </BODY></HTML>

EINLEITUNG

<HTML> <HEAD> <TITLE>Bsp</TITLE> </HEAD> <BODY> <H1><FONT COLOR=blue“>

Main Title</FONT></H1> <P><I>This is only an example text to show how a HTML- Document might look like.</I></P> <H2><FONT COLOR=blue>

First Subtitle</FONT></H2> <TABLE> <TR><TD>product 1</TD></TR> <TR><TD>product 2</TD></TR> <TR><TD>product 3</TD></TR> </TABLE> </BODY></HTML>

SZENARIO 1: CD-Sammlung

JON

SZENARIO 1: CD-Sammlung

SZENARIO 1: CD-Sammlung

Rob

15 $

SZENARIO 2: CD Laden

Die neue Single von Britney Spears ist bereits wieder ausverkauft!

SZENARIO 2: CD Laden

Good SoundMusikstr. 58052 Singen

Bestellung

CD-Namen Interpreter StückLucky B. Spears 10

AbsenderMusic Store

Good SoundMusikstr. 58052 Singen

Bestellung

CD-Namen Interpreter StückLucky B. Spears 10

AbsenderMusic Store

SZENARIO 2: CD Laden

SZENARIO 2: CD Laden

.........

..........

2RosenstolzNur einmal noch

0Britney Spears

Lucky

10Céline DionD‘Eux

5MetallicaBest Of

StückzahlInterpreterCD-Name

Inventar

Datenbank des CD-Händlers

Datenbankdes Lieferanten

Automatische Bestellung

XML

WEATHER REPORT EXAMPLE

<?xml version=„1.0“?>

Set a minimal xml document declaration

WEATHER REPORT EXAMPLE

<?xml version=„1.0“ encoding=„UTF-8“ ?>

Set the full xml document declaration

WEATHER REPORT EXAMPLE

<?xml version=„1.0“ encoding=„UTF-8“ ?>

<!-- this is a comment -->

Write a Comment

WEATHER REPORT EXAMPLE

<?xml version=„1.0“ encoding=„UTF-8“ ?>

<!-- this is a comment -->

<weatherreport> Specify a Root Node

WEATHER REPORT EXAMPLE

Kleiner Einschub zu XML-Elementen

Grundregeln zu XML-Elementen:

XML ist ‚case sensitive‘! <MYXML> =/= <myXML>

Start Tag:<price>End Tag: 14 $ </price>

Tag Name <xml> ist reserviert!

Empty Tag: <empty></empty> oder <empty/>

<?xml version=„1.0“ encoding=„UTF-8“ ?>

<!-- this is a comment -->

<weatherreport>

<city> </city>

Set a <city> Node

WEATHER REPORT EXAMPLE

<?xml version=„1.0“ encoding=„UTF-8“ ?>

<!-- this is a comment -->

<weatherreport>

<city> <name>Zurich</name> </city>

Set the <name> Node

WEATHER REPORT EXAMPLE

ROB

<?xml version=„1.0“ encoding=„UTF-8“ ?>

<!-- this is a comment -->

<weatherreport>

<city> <name>Zurich</name> <low>21°</low> <high>28°</high> </city>

Set the <low> and <high> Node

WEATHER REPORT EXAMPLE

<?xml version=„1.0“ encoding=„UTF-8“ ?>

<!-- this is a comment -->

<weatherreport>

<city> <name>Zurich</name> <low>21°</low> <high>28°</high> <description>partly cloudy</description> </city>

Set the <description> Node

WEATHER REPORT EXAMPLE

<?xml version=„1.0“ encoding=„UTF-8“ ?>

<!-- this is a comment -->

<weatherreport>

<city> <name>Zurich</name> <low>21°</low> <high>28°</high> <description>partly cloudy</description> </city>

<city> <name>Lausanne</name> <low>28°</low> <high>35°</high> <description>sunny</description> </city>

Set another <city> Node

WEATHER REPORT EXAMPLE

<?xml version=„1.0“ encoding=„UTF-8“ ?>

<!-- this is a comment -->

<weatherreport>

<city no=„1“> <name>Zurich</name> <low>21°</low> <high>28°</high> <description>partly cloudy</description> </city>

<city no=„2“> <name>Lausanne</name> <low>28°</low> <high>35°</high> <description>sunny</description> </city>

Set Key Values such that each element can be identified

WEATHER REPORT EXAMPLE

<?xml version=„1.0“ encoding=„UTF-8“ ?>

<!-- this is a comment -->

<weatherreport>

<city name=„Zurich“> <low>21°</low> <high>28°</high> <description>partly cloudy</description> </city>

<city name=„Lausanne“> <low>28°</low> <high>35°</high> <description>sunny</description> </city>

Choose more meaningful Key Values

WEATHER REPORT EXAMPLE

<?xml version=„1.0“ encoding=„UTF-8“ ?>

<!-- this is a comment -->

<weatherreport>

<city name=„Zurich“> <low>21°</low> <high>28°</high> <description>partly cloudy</description> </city>

<city name=„Lausanne“> <low>28°</low> <high>35°</high> <description>sunny</description> </city>

...

<city name=„XYZ“> ... </city>

Continue

...

WEATHER REPORT EXAMPLE

Noch einige Bemerkungen...

XML-Dokument muss well-formed sein!!

<I><B>This is italic bold</I>and this is plain bold</B><B><I>This is italic bold</I>and this is plain bold</B>

<city><name></city></name>

In HTML:

In XML:

<city><name></name></city>

Noch einige Bemerkungen...

XML-Dokument kann sogar valide sein!!

XML Dokument

Document Type

Definition (DTD)

spezifiziert

Wie weiter ???

APPLET

top related