Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Kajol52
1. NAME : KAJOL TRIPATHI
ROLL_NO : 52
CLASS : TYBCA
DIV : II
TOPIC : CASCADING STYLE
SHEET (CSS)
2. CSS :
Definition :
A cascading style sheets are a collection of style information
that is applied to plain text. Style information includes font
font attributes such as size, special effects (bold, italic, underline),
color, alignment, etc.
3. • CSS is a set of rules that specify how markup in a document
translates into appearance of the document when rendered.
• Cascading style sheet is a very powerful tool for the website
developer. They give you the chance to be completely consistent
with the look and feel of your pages, while giving you more control
over the layout and design than straight HTML ever did.
• It was invented in 1997.
There are 3 parts of CSS:
1. The Style
2. Their placement
3. The fact that they cascade
4. Styles can be implemented in 3 ways
1. Inline Styles:
Style information is placed inside an HTML tag.
example: < p style = “margin-left: 0.5 in”> same text </p>
2. Embedded styles (internal):
Style information is defined in the document by using <Style>tag.
example: <style type = “Style/CSS”>
H1 {font-family : arial , Helvetica}
p {font-size : 12pt; font-style: italic}
</style>
3. Style information is read from a separate file that is specified in the <link>
tag.
example: <link href = “body.css” type = text/CSS rel = stylesheet>
<link rel = stylesheet href = “mycss.style”>
5. EXAMPLE:
<style type = “text/CSS”>
text.span {color: red;}
span { color : blue;}
h1 span { color : black;}
p span { color : yellow;}
</style>
<h1>
<p>
<span class=“text”><span>Text</span></span>
</p>
</h1>
6. Advantages of using styles:
Saves time.
Easy to Change.
Provides consistency.
Disadvantages of using styles:
Styles have a unique syntax.