|
|||
|
Es gibt unendlich viele Vorteile, die die Nutzung von Cascading Style Sheets (CSS) bringen. Um nur einige zu nennen: Minimale Datei-Größe, kürzere Download-Zeiten und Vereinfachung jeglicher Maintenance.
Um diese Stärken für eigene Projekte nutzen zu können, ist es wichtig, CSS in der richtigen Art und Weise anzuwenden. Es gibt vier Möglichkeiten: Inline Styles: Diese werden innerhalb eines Tags definiert. Sie können die Form <p style=“text-align: center;“> annehmen, wenn dieser Absatz in der Mitte angeordnet werden soll. Diese Art von CSS sollte nur in Ausnahmefällen genutzt werden, da sie die Presentations-Informationen nicht von dem HTML Code trennen. Alle oben genannten Vorteile von CSS treffen nicht auf Inline Styles zu. Embedded Styles: Diese werden innerhalb des <head> tags definiert und sind im Hinblick auf Maintenance sicherlich besser, da man eine Änderung für alle Absätze innerhalb des Dokumentes nur einmal vornehmen muss. Doch auch hier wir der Code unnötig aufgebläht und die Styles müssen für jede Seite vom Browser geladen werden. Die Form der embedded styles ist <style type=“text/css“>p {text-align: center;}</style> External Styles: Diese Methode hat alle oben genannten Vorteile. Maintenance könnte nicht leichter sein. Man muss nur die CSS-Datei aktualisieren, damit Änderungen für die gesamte Website in kürzester Zeit durchgeführt werden. Die CSS-Datei bleibt im Browser-Cache. Somit müssen die Presentations-Informationen nicht noch einmal geladen werden, was das Ganze viel schneller macht. Innerhalb des <head> tags wird der Link zu dem externen style sheet in der folgenden Form definiert: <link rel=“stylesheet“ type=“text/css“ href=“external.css“>. Dies setzt voraus, dass man vorher oder nachher eine CSS-Datei mit Namen external.css erstellt wird. External.css könnte auch styles.css oder ähnlich heissen. Es ist nur wichtig, dass der Dateiname genau mit der Referenz in <link> übereinstimmt und sich die CSS-Datei im gleichen Ordner befindet (wenn nicht, dann muss man den genauen Pfad angeben). In der CSS-Datei wird die Absatzformattierung in folgender Art definiert: p { text-align: center;}. Imported Styles: Sind eigentlich nicht dazu bestimmt in HTML Dokumenten definiert zu werden. Dennoch macht ihre Nutzung Sinn. Ältere Browser, welche Stylesheet Informationen oftmals falsch interpretieren und Websites in kompletten Caos darstellen können, ignorieren imported styles und stellen die Website mit dem Browser-spezifischen style dar. Innerhalb des <head> tags, nach dem <title> tag definiert man <link type=“text/css“>@import url(external.css);</style> Stylesheets können für unterschiedliche Medien erstellt werden. In einem external style würde man media=“screen“ für das Website-Stylesheet bestimmen und media=“print“ für den Druck. Denn man sollte wirklich vermeiden, dass eine Website, welche einen schwarzen Hintergrund hat, alle schwarze Tinte des Druckers verbraucht, nur um die Hintergrundfarbe zu drucken;-) |
|
||||
|
Seems a great post but only if I could understand it
![]() I guess Temi will have to translate it into English now ![]()
__________________
|
|
||||
|
I know a bit of German
Guten morgan, ich bin 84 I'm not really 84 ![]()
__________________
|
|
||||
|
Lol, how did you know Temi
![]()
__________________
|
|
||||
|
I have translated it myself. It was quite easy.
![]() Here goes: There are endlessly many advantages that bring the utilization of Cascading Style Sheets (CSS). In order to name only some: Minimal file-size, shorter download-times and simplification of each Maintenance. In order to be able to use these strengths for own projects, is it important to use CSS in the correct type and manner. There are four possibilities: Inline Styles: These are defined within one day. They can the form <p style=“text-align: center;“> Suppose if this paragraph is supposed to be arranged in the middle. This type of CSS should be used only in exceptions because they do not separate the Presentations information by the HTML code. All advantages named above by CSS do not be true of Inline Styles. Embedded Styles: These become within the <head> Meet defined and are certainly better with regard to Maintenance because one must a change for all paragraphs within the document of only once distinguished. Yet also here we the code unnecessarily swelled and must be loaded the Styles for each side by the browser. The form of the embedded styles is <style type=“text/css“>p {text-align: center;}</style> External Styles: This method has everyone above named advantage. Maintenance could not be easier. One must update only the CSS-file so that changes are carried out for the total websites in shortest time. The CSS-file remains in the browser-cache. Therefore the Presentations information must not be loaded once again, what makes the entire much faster. Within the <head> That is defined day left to the external style sheet in the following form: <link rel=“stylesheet“ type=“text/css“ href=“external.css“>. This prefaces that one is generated before or afterwards a CSS-file with name external. css. External. css could also styles. css or similarly be named. It is only important, that the file name exactly with the reference in <link> Agrees and is the CSS-file in the same file (if not, must one the exact path indicate). In the CSS-file, the Absatzformattierung in following type is defined: p {text-align: center;}. Imported Styles: Are actually not in addition certainly in HTML documents defined to become. Nevertheless its utilization sense makes. Older browsers, which Stylesheet information incorrectly can interpret often and can represent websites in complete Caos, imported styles ignore and place the websites with the browser-specific style there. Within the <head> meet, after that <title> day defined one <link type=“text/css“>@import url(external.css);</style> Stylesheets can be generated for different media. In an external style, one would determine media = "screen "for the website-Stylesheet and media = "print "for the pressure. For one really should avoid that a website which has a black background consumes all black ink of the printer to print only around the background color
__________________
|
![]() |
| Useful Resources & Sites |
| • Search Engine Marketing Company • UK Web Hosting • Build One Way Links |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
| UK Webmaster World Forums - Internet marketing, web development, domain names, SEO contest and discussuons. |
| Subscribe to our feeds |