How Cascade Style Sheets Are Making the ًWeb Design Better
Updated: Aug 2, 2020
Cascade Style Sheets are the language for describing the presentation of Web pages, including colors, layout, and fonts. It allows one to adapt the presentation to different types of devices, such as large screens, small screens, or printers. CSS is independent of HTML and can be used with any XML-based markup language.
Why we use Cascade Style Sheets ?
For years, style sheets have been used in desktop publishing to apply typographic styles and spacing instructions to printed media. CSS provides this functionality (and much more) for web developers. CSS allows web developers to apply typographic styles (typeface, font size, and so on) and page layout instructions to a web page.
The CSS Zen Garden,http://www.csszengarden.com, exemplifies the power and flexibility of CSS. Visit this web site for an example of CSS in action. Notice how the content
looks dramatically different depending on the design (CSS style rules) you
CSS is a New technology
CSS is a flexible, cross-platform, standards-based language developed by the W3C. The W3C’s description of CSS can be found at http://www.w3.org/Style. Be aware that even though CSS has been in use for many years, it is still considered an emerging technology, and different browsers do not support it in exactly the same way.
What are The Advantages of Using Cascade Style Sheets ?
Regardless of the disadvantage , the CSS or the Cascading Style sheets has many advantages , that can help any web developer , i will explain here some of them such as
You have a better control in the page topography and page layout ,such as background color , font family and spacing .
All The style structure of your website is stored in a different file which can be edited faster and all edite you make on the file will apply to the whole website .
Styles can be stored. You can store styles in a separate document and associate them with the web page. When the styles are modified, the HTML remains intact. This means, for example, that if your client decides to change the background color of a set of web pages from red to white, you only need to change one file that contains the styles, instead of modifying each web page document .
Documents are potentially smaller. The formatting is separate from the document; therefore, the actual documents should be smaller.Site maintenance is easier. Again, if the styles need to be changed, then it is possible to complete the modifications by changing the style sheet
How to Use Cascade Style Sheets ?
There are different ways to configure Cascade Style Sheet each has its own rules and features
Inline styles are coded in the body of the web page as an attribute of an HTML tag. The style applies only to the specific element that contains it as an attribute.
Embedded styles (also referred to as internal styles) are defined within a style element in the head section of a web page. These style instructions apply to the entire web page document.
External styles are coded in a separate text file. This text file is associated with the web page by configuring a link element in the head section.
Imported styles are similar to external styles in that they can connect styles coded in a separate text file with a web page document. An external style sheet can be imported into embedded styles or into another external style sheet by using the @ import directive