Separation of concerns divides a program into distinct sections, each organized around a different purpose. On a web page, HTML supplies structure and content, CSS supplies presentation, and JavaScript supplies additional functionality. Keeping these responsibilities apart reduces duplication and makes code easier to maintain, extend, and test. section 1.1.1
A separated web implementation gains several practical advantages:
- Centralizing styles in an external CSS file lets one change apply across multiple HTML pages. section 1.3.3
- Avoiding repeated inline declarations keeps content and presentation from becoming tightly coupled. section 1.3.1
- Separating responsibilities supports maintainability, extensibility, stability, and easier testing. section 1.1.1
External CSS in HTML
Keep the document focused on content and link presentation from a separate file: <link rel="stylesheet" href="styles.css">. By contrast, <h1 style="color: crimson">Title of our article</h1> places styling directly beside content and becomes difficult to manage when repeated across many elements. section 1.3.3 section 1.3.1
Use the page breakdown to see how HTML, CSS, and JavaScript divide responsibility within a web page. section 1.1.1





















