Style sheet (web development)

A web style sheet is a form of separation of content and presentation for web design in which the markup (i.e., HTML or XHTML) of a webpage contains the page's semantic content and structure, but does not define its visual layout (style). Instead, the style is defined in an external style sheet file using a style sheet language such as CSS or XSLT. This design approach is identified as a "separation" because it largely supersedes the antecedent methodology in which a page's markup defined both style and structure.

The philosophy underlying this methodology is a specific case of separation of concerns.

Benefits

Separation of style and content has advantages,[1][2] but has only become practical after improvements in popular web browsers' CSS implementations.

Speed

Overall, users experience of a site utilising style sheets will generally be quicker than sites that don’t use the technology. ‘Overall’ as the first page will probably load more slowly – because the style sheet AND the content will need to be transferred. Subsequent pages will load faster because no style information will need to be downloaded – the CSS file will already be in the browser’s cache.

Maintainability

Holding all the presentation styles in one file can reduce the maintenance time and reduces the chance of error, thereby improving presentation consistency. For example, the font color associated with a type of text element may be specified — and therefore easily modified — throughout an entire website simply by changing one short string of characters in a single file. The alternative approach, using styles embedded in each individual page, would require a cumbersome, time consuming, and error-prone edit of every file.

Accessibility

Sites that use CSS with either XHTML or HTML are easier to tweak so that they appear similar in different browsers (Chrome, Internet Explorer, Mozilla Firefox, Opera, Safari, etc.).

Sites using CSS "degrade gracefully" in browsers unable to display graphical content, such as Lynx, or those so very old that they cannot use CSS. Browsers ignore CSS that they do not understand, such as CSS 3 statements. This enables a wide variety of user agents to be able to access the content of a site even if they cannot render the style sheet or are not designed with graphical capability in mind. For example, a browser using a refreshable braille display for output could disregard layout information entirely, and the user would still have access to all page content.

Customization

If a page's layout information is stored externally, a user can decide to disable the layout information entirely, leaving the site's bare content still in a readable form. Site authors may also offer multiple style sheets, which can be used to completely change the appearance of the site without altering any of its content.

Most modern web browsers also allow the user to define their own style sheet, which can include rules that override the author's layout rules. This allows users, for example, to bold every hyperlink on every page they visit. Browser extensions like Stylish and Stylus have been created to facilitate management of such user style sheets.

Consistency

Because the semantic file contains only the meanings an author intends to convey, the styling of the various elements of the document's content is very consistent. For example, headings, emphasized text, lists and mathematical expressions all receive consistently applied style properties from the external style sheet. Authors need not concern themselves with the style properties at the time of composition. These presentational details can be deferred until the moment of presentation.

Portability

The deferment of presentational details until the time of presentation means that a document can be easily re-purposed for an entirely different presentation medium with merely the application of a new style sheet already prepared for the new medium and consistent with elemental or structural vocabulary of the semantic document. A carefully authored document for a web page can easily be printed to a hard-bound volume complete with headers and footers, page numbers and a generated table of contents simply by applying a new style sheet.

Practical disadvantages today

Currently specifications (for example, XHTML, XSL, CSS) and software tools implementing these specification are only reaching the early stages of maturity. So there are some practical issues facing authors who seek to embrace this method of separating content and style.

Narrow adoption without the parsing and generation tools

While the style specifications are quite mature and still maturing, the software tools have been slow to adapt. Most of the major web development tools still embrace a mixed presentation-content model. So authors and designers looking for GUI based tools for their work find it difficult to follow the semantic web method. In addition to GUI tools, shared repositories for generalized style sheets would probably aid adoption of these methods.

See also

References

  • CSS Zen Garden: A site which challenges designers to create new page layouts without touching the XHTML source. Includes dozens of layouts. CSS source can be viewed for every layout.

Read other articles:

В іншому мовному розділі є повніша стаття Շ(вірм.). Ви можете допомогти, розширивши поточну статтю за допомогою перекладу з англійської. Дивитись автоперекладену версію статті з мови «вірменська». Перекладач повинен розуміти, що відповідальність за кінцевий вміст статті

Saint-Nicolas-lès-Cîteaux Saint-Nicolas-lès-Cîteaux (Frankreich) Staat Frankreich Region Bourgogne-Franche-Comté Département (Nr.) Côte-d’Or (21) Arrondissement Beaune Kanton Nuits-Saint-Georges Gemeindeverband Communauté de communes de Gevrey-Chambertin et de Nuits-Saint-Georges Koordinaten 47° 7′ N, 5° 3′ O47.1155555555565.0552777777778Koordinaten: 47° 7′ N, 5° 3′ O Höhe 190–227 m Fläche 28,93 km² Einwohner 398 (1....

Clayallee WappenStraße in Berlin Clayallee Clayallee am Übergang zu Schmargendorf Basisdaten Ort Berlin Ortsteil Grunewald,Schmargendorf,DahlemZehlendorf Angelegt vor 1878 Neugestaltet 1949 Hist. Namen Hauptstraße (1878–1934),Cecilienstraße (1907–1934),Kronprinzenallee (1912–1949) Anschluss­straßen Hohenzollerndamm (nördlich),Teltower Damm (südlich) Querstraßen (Auswahl)Pücklerstraße,Königin-Luise-Straße,Hüttenweg,Argentinische Allee,Saargemünder Straße,Garystraße,Sch

American fantasy drama television series This article is about the American streaming series. For other television-related uses, see Cursed#Television. CursedGenreFantasy dramaCreated by Frank Miller Tom Wheeler Based onCursedby Frank MillerTom WheelerStarring Katherine Langford Devon Terrell Gustaf Skarsgård Daniel Sharman Sebastian Armesto Lily Newmark Peter Mullan Shalom Brune-Franklin Bella Dayne Matt Stokoe ComposerJeff RussoCountry of originUnited StatesOriginal languageEnglishNo. of s...

هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (أبريل 2019) راسموس والتر   معلومات شخصية الميلاد 5 فبراير 1978 (45 سنة)[1]  آرهوس  مواطنة مملكة الدنمارك  إخوة وأخوات أنديرس والتر  الحياة العملية المهنة مغني...

АрієльAriel Аріель Дані про відкриття Дата відкриття 24 жовтня 1851 Відкривач(і) Вільям Лассел Планета Уран Номер I Орбітальні характеристики Велика піввісь 191 020 км Середній радіус орбіти 190 900 км Орбітальний період 2,52 діб Ексцентриситет орбіти 0,0012 Нахил орбіти 0,260° до п

Makam Shamai di Sungai Meron di Israel Shamai (50 SM–30 M, Ibrani: שמאי) adalah seorang guru rabinik yang hidup pada zaman Yesus Kristus di tanah Israel.[1] Ia memberi interpretasi yang keras terhadap Taurat.[1] Shamai mengambil peran aktif dalam komplikasi politik dan agamawi pada zamannya. Ia menjadi pemimpin Sanhedrin sampai waktu meninggalnya. Selain Shamai guru Yahudi saat itu adalah Hilel.[2] Interpretasi Shamai sering bertentangan dengan interpretasi Hilel...

Ця стаття потребує істотної переробки. Можливо, її необхідно доповнити, переписати або вікіфікувати. Пояснення причин та обговорення — на сторінці Вікіпедія: Статті, що необхідно поліпшити. Тому, хто додав шаблон: зважте на те, щоб повідомити основних авторів статті п...

Church in Cheshire, EnglandSt Mary's Church, NantwichSt Mary's Church, NantwichSt Mary's Church, NantwichLocation in Cheshire53°04′02″N 2°31′14″W / 53.0671°N 2.5206°W / 53.0671; -2.5206OS grid referenceSJ 651 523LocationNantwich, CheshireCountryEnglandDenominationAnglicanWebsiteSt Mary's, NantwichHistoryStatusParish churchArchitectureFunctional statusActiveHeritage designationGrade IDesignated19 April 1948Architect(s)George Gilbert Scott (restoration)Archit...

Representación de Ciro el Grande por Jean Fouquet, 1470. Ciro el Grande (c. 600 ó 576 – 530 a. C.) figura en la Biblia hebrea como el patrón y libertador de los judíos. Es mencionado 23 veces por su nombre y aludido varias veces más.[1]​ Según la Biblia, Ciro el Grande, rey de Persia, era el monarca bajo el cual la cautividad babilónica acabó. En el primer año de su reinado es incitado por Dios para decretar que el Templo en Jerusalén debía ser reconstruido y que los j...

This article's lead section may be too short to adequately summarize the key points. Please consider expanding the lead to provide an accessible overview of all important aspects of the article. (December 2023) This is a list of equipment used by the Armed Forces of Bosnia and Herzegovina. Small arms Name Origin Photo Type Variant Notes Pistols Zastava CZ 99[1]  Yugoslavia 9 mm Para semi-auto pistol Standard issue pistol. Submachine guns MP5[2]  West Germany 9 m...

For other people named Johannes Pistorius, see Johannes Pistorius (disambiguation). Jan de Bakker Gevangenpoort in The Hague where Jan de Bakker was incarcerated prior to his execution in 1525[1] Statue of Johan de Witt at De Plaats in The Hague. His two fingers point at the place where he was lynched in 1672. This is also the place where Jan de Bakker was executed in 1525. Jan Jansz de Bakker van Woerden (Latin name: Johannes Pistorius Woerdensis; 1499 – 15 September 1525) was a Ro...

2023 League of Legends World Championship XIII ediciónDatos generalesSede Corea del Sur Corea del SurFecha de inicio 10 de octubre de 2023Fecha de cierre 19 de noviembre de 2023Edición 13Organizador Riot GamesTV oficial Riot Games PalmarésCampeón T1 (4.to título)Subcampeón Weibo GamingSemifinalistas Bilibili Gaming JD Gaming Cronología 2022 LoL Worlds 2023 2024 Sitio oficial [editar datos en Wikidata] El Campeonato Mundial de League of Legends 2023 (en inglés: 2023 Leag...

East Coast hip hop recording artist discography Nas discographyNas performing at Primavera Sound in May 2019Studio albums17Compilation albums5Music videos51EPs1Singles79Collaborative albums1Mixtapes4Group albums1 The discography of Nas, an American rapper, consists of seventeen studio albums, one collaborative album, one group album, five compilations, four mixtapes, one extended play, and seventy-nine singles (including twelve collaboration singles and thirty-three as a featured artist). Nas...

Artikel ini memerlukan pemutakhiran informasi. Harap perbarui artikel dengan menambahkan informasi terbaru yang tersedia. Pemandangan Kota Malang di malam hari dari kejauhan. Berikut ini adalah daftar bangunan tertinggi di Malang Raya. Jajaran gedung di Universitas Brawijaya, juga nampak Apartemen Soekarno Hatta di kejauhan Bangunan tertinggi Begawan Apartment Malang, terlihat dari daerah Tunggulwulung Menurut tinggi Berikut ini adalah bangunan tertinggi di Kota Malang menurut tinggi bangunan...

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Novation Launchpad – news · newspapers · books · scholar · JSTOR (September 2022) (Learn how and when to remove this template message) Electronic music multi-button controller Novation LaunchpadLaunchpad S modelProduct typeElectronic music multi-button controll...

2004 single by Big & RichSave a Horse (Ride a Cowboy)Single by Big & Richfrom the album Horse of a Different Color ReleasedApril 19, 2004Recorded2003GenreCountrycountry rockcountry rapLength 3:20 (album version) 4:25 (dance mix) LabelWarner Bros. NashvilleSongwriter(s)Big Kenny, John RichProducer(s)Paul Worley, Big Kenny, John RichBig & Rich singles chronology Wild West Show (2004) Save a Horse (Ride a Cowboy) (2004) Holy Water (2004) Save a Horse (Ride a Cowboy) is a song written...

يفتقر محتوى هذه المقالة إلى الاستشهاد بمصادر. فضلاً، ساهم في تطوير هذه المقالة من خلال إضافة مصادر موثوق بها. أي معلومات غير موثقة يمكن التشكيك بها وإزالتها. (ديسمبر 2018) قرية عنق  - قرية -  تقسيم إداري البلد  اليمن المحافظة محافظة حضرموت المديرية مديرية عمد السكا...

Hindu temple in Udupi Anantheshwara Temple of UdupiReligionAffiliationHinduismDistrictUdupi districtDeityAnanteshwara Parashurama (Vishnu)LocationLocationUdupiStateKarnatakaCountryIndiaArchitectureTypeKerala temple architectureCreatorAlupasCompleted8th century C.E.WebsiteShri Anantheswara temple Udupi Anantheshwara Temple is a historic Hindu temple dedicated to Lord Ananteshwara Parashurama (an avatar of Vishnu). The Anantheshwara temple is located in Udupi, India. The temple is a unique temp...

21°29′2″N 39°11′16″E / 21.48389°N 39.18778°E / 21.48389; 39.18778 بيت نصيفبيت نصيفمعلومات عامةنوع المبنى بيتالمكان جدة، منطقة مكة المكرمةالبلد  السعوديةمعلومات أخرىالإحداثيات 21°29′02″N 39°11′16″E / 21.4839°N 39.1878°E / 21.4839; 39.1878 تعديل - تعديل مصدري - تعديل ويكي بيانات بيت نصيف...