0% found this document useful (0 votes)
3 views14 pages

Ecd Presentation

Cascading Style Sheets (CSS) are used to control the style and layout of web documents, allowing for separation of content and presentation. CSS offers advantages such as time savings, faster page loading, and easier maintenance, but also has disadvantages like browser compatibility issues and lack of security. The primary goal of CSS is to provide a consistent and customizable web design experience across multiple devices.

Uploaded by

Rakshith .A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views14 pages

Ecd Presentation

Cascading Style Sheets (CSS) are used to control the style and layout of web documents, allowing for separation of content and presentation. CSS offers advantages such as time savings, faster page loading, and easier maintenance, but also has disadvantages like browser compatibility issues and lack of security. The primary goal of CSS is to provide a consistent and customizable web design experience across multiple devices.

Uploaded by

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

CSS

CASCADING STYLE SHEET


INTRODUCTION
CSS or Cascading Style Sheet or simply a style sheet is used to control the
style of web document in a simple and easy way. A single CSS file can contain
positioning ,layout, font, colors and style information for an entire web site.
CSS file can be referenced by each html file on the site. CSS is a means of
separating the content of an html document from the style and layout of
that document.
• HTML was never intended to contain tags for formatting a document,
rather it was intended to define the content of a document, like:
Development of large web sites, where information were added to every single
page, became a long and expensive process.
• To solve this problem, the World Wide Web Consortium (W3C) created CSS
• CSS is easy to learn and understand. It provides powerful control over the
presentation of an HTML document.
• Using CSS, you can control the color of the text, the style of fonts, the spacing
between paragraphs, how columns are sized and laid out, what background
images or colors are used, as well as a variety of other effects.
ADVANTAGES OF CSS
CSS saves time— You can write CSS once and then reuse same sheet in multiple
HTML pages. You can define a style for each HTML element and apply it to as
many web pages as you want.
Pages load faster —If you are using CSS, you do not need to write HTML, tap
attributes every time. Just write one CSS rule of a tag and apply to all the
occurrences of that tag. So, less code means faster download times.
• Easy maintenance —To make a global change, simply change the style(s) in
CS5 file and all elements in all the web pages will be updated automatically.
Superior styles to HTML – CSS has a much wider array of attributes than HTML
so you can give far better look to your HTML. Page in comparison of HTML
attributes
• Multiple device compatibility – Style sheets allow content to be optimized for
mote than one type of device.
• Create dynamic pages— With CSS, anyone can easily animate HTML.
Elements with just a couple lines of simple code.
DISADVANTAGES OF CSS

Browser Compatibility: CSS works differently on different browsers Explorer and


Opera supports CSS as different logic.
• Lack of Variables: CSS contain no variables. This makes it necessary to do a
replace-all” when one desires to change a fundamental constant, such
scheme or various heights and widths.
Different Syntax to HTML: CSS was developed independently of HTML and use
different syntax, so a web developer has to learn two sets of formatting syntax
instead of one. CSS syntax is also rather clumsy and user-unfriendly
• Lack of Security: CSS is an open text-based system. There is no security built in
and anyone with read/write access to a website can disrupt the formatting by
changing the CSS files.
CSS SYNTAX/RULES

• A CSS comprises of style rules (CSS Rules) that are interpreted by the browser
and then applied to the corresponding elements in your document. A CSS rule
ha two main parts:
• (ⅰ) Selector: A selector is an HTML tag at which style will be applied. This could
be has two main parte any tag like <h1> or <table> etc.
• (ii) Declaration: Each declaration consists of a property and a value. The
property is the style attribute you want to change. Each property has a value.
A CSS declaration always ends with a semicolon, and declaration groups are
surrounded by curly brackets.
Example
<HTML> <H2>HEADING-2 IS AFFECTED
BY STYLE</H2>
<HEAD> <H3> HEADING-3 IS AFFECTED
<STYLE> BY STYLE</H3>
<p>THIS PARAGRAPH IS
P, H2, H3
AFFECTED BY STYLE<p>
{ <BODY>
<HTML>
TEXT-ALIGN: CENTER;
COLOR: BLUE;
FONT-WEIGHT: BOLD;
}
</STYLE>
</HEAD>
<BODY>
CONCLUSION

• Cascading Style Sheets (CSS) is foundational to modern web design, allowing


for extensive customization and styling of web content.
• CSS can empower a more brand-aligned, user-friendly, and responsive web
presence.
• CSS describes how elements should be rendered on screen, on paper, in
speech, or on other media.
• It is a design language intended to simplify the process of making web pages
presentable. CSS determines the visual structure, layout, and aesthetics.
• CSS allows you to format the design, style, font, and color of text; set margins
and padding; background colors, and border styles.
• The primary goal of CSS is to separate the structure of a webpage (HTML)
from its style or presentation. This separation provides several key
advantages: Consistency: By defining styles centrally in CSS, you can ensure a
consistent look and feel across all website pages.
🙏

You might also like