CSS



Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language such as HTML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.
Overview[edit]
CSS is designed to enable the separation of presentation and content, including layout, colors, and fonts. This separation can improve content accessibility, provide more flexibility and control in the specification of presentation characteristics, enable multiple web pages to share formatting by specifying the relevant CSS in a separate .css file, and reduce complexity and repetition in the structural content.
Syntax[edit]
The CSS syntax consists of a set of rules. These rules are composed of selectors and a declaration block. A selector points to the HTML element you want to style, while the declaration block contains one or more declarations separated by semicolons. Each declaration includes a CSS property name and a value, separated by a colon.
Selectors[edit]
Selectors are patterns used to select the elements you want to style. There are several types of selectors in CSS:
- Element selectors
- ID selectors
- Class selectors
- Attribute selectors
- Pseudo-class selectors
- Pseudo-element selectors
Properties[edit]
CSS properties are the actual elements you wish to change. They could be color, font, width, height, background, and many more. Each property has a value that you assign to it, which dictates how it should look on the web page.
Inheritance and Cascade[edit]
Inheritance is a principle of CSS where some styles (like font-family or color) will be inherited by child elements from their parent elements. The cascade is a set of rules that defines how to resolve conflicts when multiple rules apply to an element. It takes into account specificity, importance, and source order.
Media Queries[edit]
Media queries allow the content rendering to adapt to conditions such as screen resolution (e.g., smartphone screen vs. computer screen). They are a key component of responsive web design, allowing developers to create web pages that work well on a variety of devices.
Frameworks and Preprocessors[edit]
CSS frameworks (like Bootstrap) and preprocessors (like Sass or LESS) are tools that can help streamline the process of writing CSS. They offer more functionality and syntactical sugar on top of standard CSS, such as variables, nested rules, and mixins.
History[edit]
CSS was first proposed by Håkon Wium Lie on October 10, 1994. At the time, the web was beginning to grow, but there was a clear need for web documents to be presented more attractively. The first CSS specification, CSS1, was released in 1996. Since then, CSS has gone through several versions, with CSS3 being split into modules and still under development to include more features.
Future of CSS[edit]
The future of CSS includes variables (custom properties), grid layout, flexbox, and more, which are designed to make layouts and designs more flexible and easier to manage. New features and improvements are continuously being worked on by the World Wide Web Consortium (W3C).
Ad. Transform your health with W8MD Weight Loss, Sleep & MedSpa

Tired of being overweight?
Special offer:
Budget GLP-1 weight loss medications
- Semaglutide starting from $29.99/week and up with insurance for visit of $59.99 and up per week self pay.
- Tirzepatide starting from $45.00/week and up (dose dependent) or $69.99/week and up self pay
✔ Same-week appointments, evenings & weekends
Learn more:
- GLP-1 weight loss clinic NYC
- W8MD's NYC medical weight loss
- W8MD Philadelphia GLP-1 shots
- Philadelphia GLP-1 injections
- Affordable GLP-1 shots NYC
|
WikiMD Medical Encyclopedia |
Medical Disclaimer: WikiMD is for informational purposes only and is not a substitute for professional medical advice. Content may be inaccurate or outdated and should not be used for diagnosis or treatment. Always consult your healthcare provider for medical decisions. Verify information with trusted sources such as CDC.gov and NIH.gov. By using this site, you agree that WikiMD is not liable for any outcomes related to its content. See full disclaimer.
Credits:Most images are courtesy of Wikimedia commons, and templates, categories Wikipedia, licensed under CC BY SA or similar.
Translate this page: - East Asian
中文,
日本,
한국어,
South Asian
हिन्दी,
தமிழ்,
తెలుగు,
Urdu,
ಕನ್ನಡ,
Southeast Asian
Indonesian,
Vietnamese,
Thai,
မြန်မာဘာသာ,
বাংলা
European
español,
Deutsch,
français,
Greek,
português do Brasil,
polski,
română,
русский,
Nederlands,
norsk,
svenska,
suomi,
Italian
Middle Eastern & African
عربى,
Turkish,
Persian,
Hebrew,
Afrikaans,
isiZulu,
Kiswahili,
Other
Bulgarian,
Hungarian,
Czech,
Swedish,
മലയാളം,
मराठी,
ਪੰਜਾਬੀ,
ગુજરાતી,
Portuguese,
Ukrainian
