Introduction to CSS
Introduction to CSS - cmpnoteblog Introduction to CSS (Cascading Style Sheets) What is CSS? CSS is the language we use to style an HTML document. While HTML provides the structure of a web page, CSS describes how HTML elements should be displayed on screen, paper, or in other media. CSS Syntax A CSS rule consists of a selector and a declaration block . selector { property: value; } Selector: The HTML element you want to style (e.g., h1, p). Property: The style attribute you want to change (e.g., color, font-size). Value: The setting applied to the property (e.g., red, 20px). Three Methods of Applying CSS A. Inline CSS Applied directly to a single element using the style attribute. It is written inside the HTML tag and not in the head . <!...