Have you failed a job interview?
Send us your job interview questions and get correct answers.
Why use CSS?
Experience Level: Junior
- simplify the maintenance of your website,
- avoid duplication of code,
- allow you to use multiple styles for one content,
- save your time
Because CSS styles can be defined once and used multiple times, it is very easy to control the style of your website. Instead of editing all pages one by one, you can define a style and apply it to elements that you want. When you later need to do a change to the style, it is just a matter of changing one file.
CSS styles are separated from HTML and you don't need to duplicate them if you want to apply styles on multiple places.
You can also switch between multiple styles. As an example, it is possible to create summer and winder theme for your website and automatically apply the styles depending on the year time. Or you can define skins and let the user use whichever skin he likes.
Related CSS job interview questions
Can you describe CSS syntax?CSS Junior
What problem does CSS solve?CSS Junior
What is CSS and what is it used for?CSS Junior
What is a Style Sheet?CSS Junior
How can I include comments in my Style Sheet?CSS Junior