In: Computer Science
What are the reasons for adding CSS to web programming? Also provide a briefing of CSS rules, syntax, and styles.
Answer:
Reasons for adding CSS to web programming:
The look and feel of the content written in HTML can be controlled by an extremely powerful style sheet language CSS. Cascading Style Sheets, commonly known as CSS, is an integral part of the modern web development process. The layout and presentation of website can be handled well by separating content from design as it is a highly effective HTML tool.
Some of reasons why everyone should use CSS in web design:
1. CSS Provides Efficiency in Design and Updates
2. CSS Use Can Lead To Faster Page Downloads
3. CSS is Easy to Work With
CSS rules, syntax and style:
A CSS rule is a grouping of one or more CSS properties which are to be applied to one or more target HTML elements.
A CSS rule-set consists of a selector and a declaration block.
The selector points to the HTML element you want to style.
The declaration block contains one or more declarations separated by semicolons.
Each declaration includes a CSS property name and a value, separated by a colon.
A CSS declaration always ends with a semicolon, and declaration blocks are surrounded by curly braces.
For example:
div { border : 1px solid black; font-size : 18px; }
Please give thumbsup, if you like it. Thanks.