MrMurphy: Text wie in Word bei "TABS" darstellen

Beitrag lesen

Hallo,

ich habe grade gesehen, das mein letzes Beispiel nicht korrekt ist. Statt "id" sollte man besser "class" nehmen, da eine "id" eindeutig sein soll und im html-Quellcode deshalb nur einmal vorkommen darf. Das Beispiel sollte deshalb besser so aussehen:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml">  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
<title>Unbenanntes Dokument</title>  
<style type="text/css">  
span{  
	display: block;  
	float: left;  
}  
.anrede{  
	width: 60px;  
}  
.name{  
	width: 140px;  
}  
.telefon{  
	width: 50px;  
}  
</style>  
</head>  
<body>  
<span class="anrede">Herr</span>  
<span class="name">Meier</span>  
<span class="telefon">Tel.</span>  
0123789/333-67<br />  
  
<span class="anrede">Frau</span>  
<span class="name">Welke</span>  
<span class="telefon">Tel.</span>  
0123789/333-68<br />  
  
<span class="anrede">Herr</span>  
<span class="name">Schmidt</span>  
<span class="telefon">Tel.</span>  
0123789/333-69<br />  
  
</body>  
</html>

Gruss

MrMurphy