CSS Styling and Layout Fundamentals – Intro to CS Concepts and Programming – Study Notes
offline

Source: Comprehensive Guide to Web Forms and CSS Styling (Texas A&M)

Tags: CSS, Cascading Style Sheets, selectors, specificity, cascade, inheritance, box model, CSS units, em, rem, viewport units, font properties, text styling, external stylesheet, inline styles, embedded styles, typography, web fonts

Difficulty: Beginner to Intermediate Prerequisites: Basic HTML structure (elements, attributes, nesting). Familiarity with how a browser renders an HTML document. The companion Web Forms notes are helpful but not required.


Big Picture

CSS is the layer that controls how HTML content looks. Without it, every webpage would be plain black text on a white background with default browser styling. This topic covers how CSS rules are written and applied, how the browser decides which rule wins when there are conflicts (the cascade), how elements are sized and spaced (the box model), and how text and fonts are styled. You will use these fundamentals in virtually every web project, so this is core knowledge rather than a niche topic.


TL;DR

CSS rules consist of a selector (what to style) and a declaration block (how to style it). Rules can live in external files, a

Written inside a