Blogarchiv
- May 2012
- March 2012
- February 2012
- January 2012
- November 2011
- October 2011
- September 2011
- July 2011
- June 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- May 2010
- April 2010
- March 2010
- January 2010
- December 2009
- October 2009
- August 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- February 2008
Zeilenumbruch mit Schriftart
Jawohl, ich gestehe: Wenn ich eine Website sehe, die mir gut erscheint, dann schaue ich auch gerne mal in den Quelltext. So habe ich auch bei http://bertkiewiet.nl/, einer Website von einem Freund meines Vaters, einen Blick hinter die Kulissen gewagt, weil ich wissen wollte, wie er diese Foto- Galerien hinbekommt.
Also schaue ich im <head> der Seite nach: Außer einem <meta>- Element und einem leeren <title>- tag gibt es dort nichts zu sehen. Interessant und neu für mich: Wenn <title></title> (in genau dieser Schreibweise) im <head> steht, dann wird der Domain- Name als Titel für die Browserzeile genutzt.
Wenn dagegen aber kein <title> im <head> angegeben ist, erscheint « Unbenanntes Dokument » oder ähnliches als Seitentitel. Haben Sie schon mal nach diesem Stichwort gegoogelt? Erschreckend, dieses Suchergebnis: Etwa 1.930.000 Seiten haben im Netz den Titel « Unbenanntes Dokument ». Naja, wie auch immer. Ich war etwas abgeschwoffen (falls es dieses Wort gibt; es soll mir hier als Partizip von « abschweifen » dienen).
Jedenfalls: Leider war kein <meta name=“Generator” content=”...”> vorhanden, was mir das Programm verraten hätte, womit Bert seine Website gemacht hat. Jetzt habe ich erfahren, dass er diese Foto- Galerie, die leider auf Flash aufsetzt, mit SimpleViewer gemacht hat. Aber darauf wollte ich nicht hinaus.
Erstmal ist mir schon beim Überfliegen aufgefallen, dass dieser Quelltext sehr unstrukturiert ist. Warum schreibt er mühsam:
<big><span style="font-family: Verdana;">Welcome ...</span></big>
Warum nicht einfach:
<h1>Welcome to the photo website of Bert Kiewiet</h1>
und legt dann im <head> fest:
<style type="text/css">
h1 {
font-size: 130%; /* Oder irgendein anderer Wert,
der dem HTML- tag <big> in etwa entspricht */
font-family: Verdana;
}
</style>
oder (noch besser): Er lagert seine Styles in eine (oder auch mehrere) CSS- Datei (-en) aus:
h1 {
font-size: 130%; /* Oder irgendein anderer Wert,
der dem HTML- tag <big> in etwa entspricht */
font-family: Verdana;
}
Als ob das schon nicht schlimm genug ist (der Code jetzt, an der Website habe ich vom Aussehen her nichts
), legt unser Bert dann auch noch für einen Zeilenumbruch eine Schriftart fest:
<br style="font-family: Verdana;">
Warum nur? Warum muss man für einen Zeilenumbruch eine Schriftart festlegen? Welcher Sinn steckt dahinter? Aber die große Frage bleibt immer noch: Wie hat er es überhaupt geschafft, einem Zeilenumbruch die Schriftart Verdana mit auf den Weg zu geben?
Kommentare
- — Bert am 16. May 2010 um 14:59 Uhr (#)
Dear Hans,
That is an excellent observation. The source code is indeed a mess.
The photo albums were made using Adobe Lightroom with a SimpleViewer add-in. But the index was quickly made in half an hour at breakfast during our holiday in Scotland. While traveling we (myself and the forementioned third person) found out we didn’t have anything installed to make an index page (not even Frontpage or whatever). And we need some kind of program for dummies to help us….given the fact that we know a lot about chemical engineering and law, programming is not our forte.
Therefore we quickly downloaded a freeware program called Nvu (N-view). And well…you probably know the expression: you pay peanuts, you get monkeys… again an excellent example of this profound wisdom…
What is your expert opinion in this matter, is there any program for dummies that you can recommend?
All the best,
Bert
- — Hans Bauer am 16. May 2010 um 15:00 Uhr (#)
Dear Bert,
thank you for your comment. Congratulations! You are the first one (except my family members) who dared to comment on one of my blog entries. Thank you for your courage. Obviously, for most of the people it isn’t easy to overcome their feelings and write a comment.Concerning the WYSIWYG- editors: I’ve heard from this Nvu, too, but I’ve never worked with it yet (but I want to later on …)
Another recommendation of a WYSIWYG- editor is rather difficult. If you want a open-source-product I can’t really help you. But if you want a pure-source-code-editor I have three really good recommendations for you:
First the Komodo Edit editor which is offering a great function which only a few open-source-editors master and which is called “code-folding”. You can easily fade in / fade out complete passages of the code in order to make it clearer.
The second editor is the weaverslave- editor which is very good at syntax- highlighting.
The third editor is the notepad editor. Great editor, without any functions, but do you really need all these things which make it more easier to work with your code? In an e-mail to me you said it yourself: “notepad is the way to do it”.If you want a program which is liable to costs I really recommend you the Dreamweaver. But it’s a program for the pros and the training period is as long as you would learn how to deal with Photoshop.
Best wishes,
Hans

Ja, warum gibt man einem Zeilenumbruch eine Schriftart mit auf den Weg? Eigentlich schafft es dieser Zeilenumbruch auch ganz ohne Schriftart, wohl wahr. Also einfach ‘br’ in spitzen Klammern schreiben. Ich glaube aber, daß unser Bert hier ganz unschuldig ist. Ich vermute mal, daß eine dritte Person die Seite für ihn erstellt hat. Genau weiß ich ich es aber nicht.
Aber die Fotogalerie funktioniert gut, gell?
Gruß von
Ma aus Ba