0% found this document useful (0 votes)
4 views1 page

Cssfile

CSS, or Cascading Style Sheets, is a stylesheet language that controls the presentation and layout of HTML elements on web pages, separating structure from style for easier maintenance. It employs cascading rules to determine style precedence, uses selectors to target elements, and supports responsive design through media queries. CSS can be included in HTML documents in three ways: inline, internal, or external.

Uploaded by

Kunal Negi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Cssfile

CSS, or Cascading Style Sheets, is a stylesheet language that controls the presentation and layout of HTML elements on web pages, separating structure from style for easier maintenance. It employs cascading rules to determine style precedence, uses selectors to target elements, and supports responsive design through media queries. CSS can be included in HTML documents in three ways: inline, internal, or external.

Uploaded by

Kunal Negi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

CSS stands for Cascading Style Sheets.

It's a stylesheet language used to control


the presentation and layout of HTML elements on a web page. While HTML is used to
structure content (like text, images, and links), CSS is used to style that content
—such as by changing fonts, colors, spacing, and positioning.

Key Features of CSS:


Separation of Concerns:

Keeps structure (HTML) separate from style (CSS).

Makes maintenance and updates easier.

Cascading Rules:

"Cascading" means that styles are applied based on a hierarchy: browser defaults <
external stylesheets < internal styles < inline styles.

When multiple rules apply to the same element, CSS determines which one takes
precedence using specificity and source order.

Selectors:

CSS uses selectors to target HTML elements (e.g., p, .class, #id) and apply styles.

Responsive Design:

CSS can create layouts that adapt to different screen sizes using media queries.

Reusability:

CSS rules can be reused across multiple HTML files by linking a single CSS file.

Example:
html
Copy
Edit
<!-- HTML -->
<p class="greeting">Hello, world!</p>
css
Copy
Edit
/* CSS */
.greeting {
color: blue;
font-size: 18px;
margin: 20px;
}
Ways to Include CSS:
Inline (inside HTML tag with style attribute)

Internal (inside <style> tag in the HTML <head>)

External (link to a .css file)

You might also like