Nepal Police2080 BSQuestion 7 of 14
Explain how the CSS helps in enhancing the design of a webpage.
5 marks
Question source
- Exam year
- 2080 BS / 2024 AD
- Level
- Sub-Inspector (Prabidhik – IT/Computer)
- Paper
- Paper II – Professional and Service Specific Test
- Section
- Section B
Model answer
CSS (Cascading Style Sheets) separates presentation from HTML content, so one stylesheet styles hundreds of pages consistently.
How it enhances design:
- Consistent look — One
style.csssets colours, fonts and header for the whole gov.np site; change once, all pages update. - Layout — Flexbox/Grid create responsive columns, menus and cards that fit mobile and desktop (mandatory under Website Directive 2078).
- Readability — Line spacing, contrast and Nepali font (Nirmala UI) settings improve citizen reading.
- Interactivity — Hover, focus and print styles without JavaScript. Example:
a:hover { color: blue; }. - Types: Inline (
<p style>), Internal (<style>in head), External (<link href="style.css">) — external preferred for reuse and caching.
Example: body { background: #f5f5f5; font-family: "Nirmala UI"; } table { border-collapse: collapse; } instantly cleans a raw HTML table.