CSS Notes
CSS Notes
CSS works by providing a set of rules that define how HTML elements should be displayed
on a web page. These rules include things like font size, color, spacing, and positioning, as
well as more complex properties like animations and transitions.
CSS can be added to an HTML document in several ways, including inline styles,
embedded styles, and external style sheets. Inline styles are added directly to HTML
elements using the "style" attribute, while embedded styles are placed within the "head"
section of an HTML document. External style sheets are separate files that contain all of the
CSS rules for a website, and are linked to from the HTML document using the "link" tag.
CSS is an essential tool for web development, allowing designers and developers to create
visually appealing and user-friendly websites. It is constantly evolving, with new features
and capabilities being added with each new version, making it a powerful tool for creating
modern, responsive web designs
Cascading Style Sheets, fondly referred to as CSS, is a simply designed language intended
to simplify the process of making web pages presentable. CSS allows you to apply styles to
web pages. More importantly, CSS enables you to do this independent of the HTML that
makes up each web page.
1
ABOUT CSS
The story of CSS begins in the early days of the web, when websites were simple
and consisted mostly of plain text and simple images. As web designers and developers
began to experiment with more complex layouts and designs, they quickly realized the
limitations of HTML, the markup language used to structure web documents.
HTML provided only basic styling options, such as bold and italic text,
and there was no easy way to control the layout and positioning of page
elements. To address this issue, the first version of CSS was introduced in
1996 by Hakon Wium Lie, a researcher at CERN, the European
Organization for Nuclear Research.
The basic building block of CSS syntax is a rule, which consists of a selector and one or
more declarations. Selectors specify which HTML elements the rule should apply to, while
declarations define the style properties of those elements.
Example
h1{color:blue;}