SlideShare a Scribd company logo
CONCEPT OF CSS
PART II
BY:SURBHI SAROHA
Assistant Professor
1SURBHI SAROHA
SYLLABUS
 CSS Id and Class.
 Box Model(Introduction , Border properties ,
Padding Properties , Margin properties).
 CSS Advanced(Grouping, Dimension , Display
, Positioning , Floating , Align , Pseudo class,
Navigation Bar , Image Sprites , Attribute
sector)
 CSS Color
2SURBHI SAROHA
CSS Id and Class.
 In the CSS, a class selector is a name
preceded by a full stop (“.”) and an ID selector
is a name preceded by a hash character (“#”).
 The difference between an ID and a class is
that an ID can be used to identify one
element, whereas a class can be used to
identify more than one.
3SURBHI SAROHA
The CSS id Selector
 The id selector uses the id attribute of an
HTML element to select a specific element.
 The id of an element is unique within a page,
so the id selector is used to select one unique
element!
 To select an element with a specific id, write a
hash (#) character, followed by the id of the
element.
4SURBHI SAROHA
Example
 <!DOCTYPE html>
 <html>
 <head>
 <style>
 #para1 {
 text-align: center;
 color: red;
 }
 </style>
 </head>
 <body>
 <p id="para1">HelloWorld!</p>
 <p>This paragraph is not affected by the style.</p>
 </body>
 </html>
5SURBHI SAROHA
The CSS class Selector
 The class selector selects HTML elements
with a specific class attribute.
 To select elements with a specific class, write
a period (.) character, followed by the class
name.
6SURBHI SAROHA
Example
 <!DOCTYPE html>
 <html>
 <head>
 <style>
 .center {
 text-align: center;
 color: red;
 }
 </style>
 </head>
 <body>
 <h1 class="center">Red and center-aligned heading</h1>
 <p class="center">Red and center-aligned paragraph.</p>
 </body>
 </html>
7SURBHI SAROHA
Box Model(Introduction , Border properties ,
Padding Properties , Margin properties).
 When laying out a document, the browser's
rendering engine represents each element as a
rectangular box according to the standard CSS
basic box model.
 CSS determines the size, position, and
properties (color, background, border size, etc.)
of these boxes.
 Every box is composed of four parts (or areas),
defined by their respective edges: the content
edge, padding edge, border edge, and margin
edge.
8SURBHI SAROHA
9SURBHI SAROHA
Cont….
 The content area, bounded by the content edge, contains the "real"
content of the element, such as text, an image, or a video player. Its
dimensions are the content width (or content-box width) and the content
height (or content-box height).
 It often has a background color or background image.
 If the box-sizing property is set to content-box (default) and if the
element is a block element, the content area's size can be explicitly
defined with the width, min-width, max-width, height, min-height,
and max-height properties.
 The padding area, bounded by the padding edge, extends the content
area to include the element's padding.
 Its dimensions are the padding-box width and the padding-box height.
 The thickness of the padding is determined by the padding-
top, padding-right, padding-bottom, padding-left, and
shorthand padding properties.
10SURBHI SAROHA
Cont…
 The border area, bounded by the border edge, extends the
padding area to include the element's borders.
 Its dimensions are the border-box width and the border-box
height.
 The thickness of the borders are determined by the border-
width and shorthand border properties.
 If the box-sizing property is set to border-box, the border area's
size can be explicitly defined with the width, min-width, max-
width, height, min-height, and max-height properties.
 When there is a background (background-color or background-
image) set on a box, it extends to the outer edge of the border
(i.e. extends underneath the border in z-ordering).
 This default behavior can be altered with the background-clip css
property.
11SURBHI SAROHA
Cont….
 The margin area, bounded by the margin edge, extends
the border area to include an empty area used to separate
the element from its neighbors.
 Its dimensions are the margin-box width and the margin-
box height.
 The size of the margin area is determined by the margin-
top, margin-right, margin-bottom, margin-left, and
shorthand margin properties.When margin
collapsing occurs, the margin area is not clearly defined
since margins are shared between boxes.
 Finally, note that for non-replaced inline elements, the
amount of space taken up (the contribution to the height of
the line) is determined by the line-height property, even
though the borders and padding are still displayed around
the content.
12SURBHI SAROHA
Cont…
 Explanation of the different parts:
 Content -The content of the box, where text
and images appear
 Padding - Clears an area around the content.
The padding is transparent
 Border - A border that goes around the
padding and content
 Margin - Clears an area outside the border.
The margin is transparent
13SURBHI SAROHA
Example
 <!DOCTYPE html>
 <html>
 <head>
 <style>
 div {
 background-color: lightgrey;
 width: 300px;
 border: 15px solid green;
 padding: 50px;
 margin: 20px;
 }
 </style>
 </head>
 <body>
14SURBHI SAROHA
Cont…
 <h2>Demonstrating the Box Model</h2>
 <p>The CSS box model is essentially a box that wraps
around every HTML element. It consists of: borders,
padding, margins, and the actual content.</p>
 <div>This text is the content of the box. We have added a
50px padding, 20px margin and a 15px green border. </div>
 </body>
 </html>
15SURBHI SAROHA
CSS Advanced(Grouping, Dimension , Display ,
Positioning , Floating , Align , Pseudo class,
Navigation Bar , Image Sprites , Attribute
sector)
 Image Sprites
 An image sprite is a collection of images put
into a single image.
 A web page with many images can take a
long time to load and generates multiple
server requests.
 Using image sprites will reduce the number of
server requests and save bandwidth.
SURBHI SAROHA 16
Cont….
 Image Sprites - Simple Example
 Instead of using three separate images, we
use this single image ("img_navsprites.gif"):
 With CSS, we can show just the part of the
image we need.
 In the following example the CSS specifies
which part of the "img_navsprites.gif" image
to show:
SURBHI SAROHA 17
Example
 <!DOCTYPE html>
 <html>
 <head>
 <style>
 #home {
 width: 46px;
 height: 44px;
 background: url(img_navsprites.gif) 0 0;
 }
 #next {
SURBHI SAROHA 18
Cont….
 width: 43px;
 height: 44px;
 background: url(img_navsprites.gif) -91px 0;
 }
 </style>
 </head>
 <body>
 <img id="home" src="img_trans.gif" width="1" height="1"><br><br>
 <img id="next" src="img_trans.gif" width="1" height="1">
 </body>
 </html>
SURBHI SAROHA 19
CSS Pseudo-classes
 What are Pseudo-classes?
 A pseudo-class is used to define a special
state of an element.
 For example, it can be used to:
 Style an element when a user mouses over it
 Style visited and unvisited links differently
 Style an element when it gets focus
SURBHI SAROHA 20
Syntax
 selector:pseudo-class {
property: value;
}
SURBHI SAROHA 21
CSS Navigation Bar
 Navigation Bar = List of Links
 A navigation bar needs standard HTML as a
base.
 In our examples we will build the navigation
bar from a standard HTML list.
 A navigation bar is basically a list of links, so
using the <ul> and <li> elements makes
perfect sense:
SURBHI SAROHA 22
Example
 <!DOCTYPE html>
 <html>
 <body>
 <ul>
 <li><a href="#home">Home</a></li>
 <li><a href="#news">News</a></li>
 <li><a href="#contact">Contact</a></li>
 <li><a href="#about">About</a></li>
 </ul>
 <p>Note: We use href="#" for test links. In a real web site this
would be URLs.</p>
 </body>
 </html>
SURBHI SAROHA 23
OUTPUT
 Home
 News
 Contact
 About
 Note:We use href="#" for test links. In a real
web site this would be URLs.
SURBHI SAROHA 24
Vertical Navigation Bar
Examples
 <!DOCTYPE html>
 <html>
 <head>
 <style>
 ul {
 list-style-type: none;
 margin: 0;
 padding: 0;
 width: 200px;
 background-color: #f1f1f1;
 }
SURBHI SAROHA 25
Cont….
 li a {
 display: block;
 color: #000;
 padding: 8px 16px;
 text-decoration: none;
 }
 /* Change the link color on hover */
 li a:hover {
 background-color: #555;
 color: white;
 }
 </style>
 </head>
 <body>
SURBHI SAROHA 26
CSS Color
 Colors are specified using predefined color names, or
RGB, HEX, HSL, RGBA, HSLA values.
 <!DOCTYPE html>
 <html>
 <body>
 <h1 style="background-
color:Tomato;">Tomato</h1>
 <h1 style="background-
color:Orange;">Orange</h1>
 <h1 style="background-
color:DodgerBlue;">DodgerBlue</h1>
SURBHI SAROHA 27
Cont…
 <h1 style="background-
color:MediumSeaGreen;">MediumSeaGreen</h1>
 <h1 style="background-color:Gray;">Gray</h1>
 <h1 style="background-
color:SlateBlue;">SlateBlue</h1>
 <h1 style="background-color:Violet;">Violet</h1>
 <h1 style="background-
color:LightGray;">LightGray</h1>
 </body>
 </html>
SURBHI SAROHA 28
CSS Background Color
 <!DOCTYPE html>
 <html>
 <body>
 <h1 style="background-color:DodgerBlue;">HelloWorld</h1>
 <p style="background-color:Tomato;">
 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
diam nonummy nibh euismod tincidunt ut laoreet dolore magna
aliquam erat volutpat.
 Ut wisi enim ad minim veniam, quis nostrud exerci tation
ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo
consequat.
 </p>
 </body>
 </html>
SURBHI SAROHA 29
CSS Text Color
 <!DOCTYPE html>
 <html>
 <body>
 <h3 style="color:Tomato;">HelloWorld</h3>
 <p style="color:DodgerBlue;">Lorem ipsum dolor sit amet,
consectetuer adipiscing elit, sed diam nonummy nibh
euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat.</p>
 <p style="color:MediumSeaGreen;">Ut wisi enim ad minim
veniam, quis nostrud exerci tation ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.</p>
 </body>
 </html>
SURBHI SAROHA 30
CSS Border Color
 <!DOCTYPE html>
 <html>
 <body>
 <h1 style="border: 2px solidTomato;">Hello
World</h1>
 <h1 style="border: 2px solid DodgerBlue;">Hello
World</h1>
 <h1 style="border: 2px solidViolet;">Hello
World</h1>
 </body>
 </html>
SURBHI SAROHA 31
SURBHI SAROHA 32
THANK YOU 
Ad

More Related Content

What's hot (20)

session and cookies.ppt
session and cookies.pptsession and cookies.ppt
session and cookies.ppt
Jayaprasanna4
 
Css pseudo-classes
Css pseudo-classesCss pseudo-classes
Css pseudo-classes
Webtech Learning
 
3 Layers of the Web - Part 1
3 Layers of the Web - Part 13 Layers of the Web - Part 1
3 Layers of the Web - Part 1
Jeremy White
 
Introduction - Web Technologies (1019888BNR)
Introduction - Web Technologies (1019888BNR)Introduction - Web Technologies (1019888BNR)
Introduction - Web Technologies (1019888BNR)
Beat Signer
 
Css selectors
Css selectorsCss selectors
Css selectors
Parth Trivedi
 
Bootstrap 5 ppt
Bootstrap 5 pptBootstrap 5 ppt
Bootstrap 5 ppt
Mallikarjuna G D
 
page ranking algorithm
page ranking algorithmpage ranking algorithm
page ranking algorithm
Javed Khan
 
HTML frames and HTML forms
HTML frames and HTML formsHTML frames and HTML forms
HTML frames and HTML forms
Nadine Cruz
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Amit Tyagi
 
Html styles
Html stylesHtml styles
Html styles
Micah Fuentes
 
Html list
Html listHtml list
Html list
sayed fathey
 
Web Design Notes
Web Design NotesWeb Design Notes
Web Design Notes
butest
 
Html links
Html linksHtml links
Html links
JayjZens
 
Database Connectivity in PHP
Database Connectivity in PHPDatabase Connectivity in PHP
Database Connectivity in PHP
Taha Malampatti
 
Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface)
Vibhawa Nirmal
 
Basic concepts for python web development
Basic concepts for python web developmentBasic concepts for python web development
Basic concepts for python web development
NexSoftsys
 
SOA
SOASOA
SOA
Indeevari Ramanayake
 
Client server architecture
Client server architectureClient server architecture
Client server architecture
RituBhargava7
 
Intro to html 5
Intro to html 5Intro to html 5
Intro to html 5
Ian Jasper Mangampo
 
Wordpress ppt
Wordpress pptWordpress ppt
Wordpress ppt
Crest TechnoSoft
 
session and cookies.ppt
session and cookies.pptsession and cookies.ppt
session and cookies.ppt
Jayaprasanna4
 
3 Layers of the Web - Part 1
3 Layers of the Web - Part 13 Layers of the Web - Part 1
3 Layers of the Web - Part 1
Jeremy White
 
Introduction - Web Technologies (1019888BNR)
Introduction - Web Technologies (1019888BNR)Introduction - Web Technologies (1019888BNR)
Introduction - Web Technologies (1019888BNR)
Beat Signer
 
page ranking algorithm
page ranking algorithmpage ranking algorithm
page ranking algorithm
Javed Khan
 
HTML frames and HTML forms
HTML frames and HTML formsHTML frames and HTML forms
HTML frames and HTML forms
Nadine Cruz
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Amit Tyagi
 
Web Design Notes
Web Design NotesWeb Design Notes
Web Design Notes
butest
 
Html links
Html linksHtml links
Html links
JayjZens
 
Database Connectivity in PHP
Database Connectivity in PHPDatabase Connectivity in PHP
Database Connectivity in PHP
Taha Malampatti
 
Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface)
Vibhawa Nirmal
 
Basic concepts for python web development
Basic concepts for python web developmentBasic concepts for python web development
Basic concepts for python web development
NexSoftsys
 
Client server architecture
Client server architectureClient server architecture
Client server architecture
RituBhargava7
 

Similar to Concept of CSS part 2 (20)

CSS Walktrough Internship Course
CSS Walktrough Internship CourseCSS Walktrough Internship Course
CSS Walktrough Internship Course
Zoltan Iszlai
 
Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3
Binu Paul
 
Web Programming& Scripting Lab
Web Programming& Scripting LabWeb Programming& Scripting Lab
Web Programming& Scripting Lab
Swapnali Pawar
 
Pfnp slides
Pfnp slidesPfnp slides
Pfnp slides
William Myers
 
Cascading Style sheet by Vishal Gour Guest Faculty CSE AUS
Cascading Style sheet by Vishal Gour Guest Faculty  CSE AUSCascading Style sheet by Vishal Gour Guest Faculty  CSE AUS
Cascading Style sheet by Vishal Gour Guest Faculty CSE AUS
ervishalgour
 
CSS
CSS CSS
CSS
Sunil OS
 
CSS-3 Course Slide
CSS-3 Course SlideCSS-3 Course Slide
CSS-3 Course Slide
BoneyGawande
 
Web topic 15 1 basic css layout
Web topic 15 1  basic css layoutWeb topic 15 1  basic css layout
Web topic 15 1 basic css layout
CK Yang
 
CSS For Coders
CSS For CodersCSS For Coders
CSS For Coders
ggfergu
 
Css3
Css3Css3
Css3
Anjan Banda
 
gdg_workshop 4 on web development HTML & CSS
gdg_workshop 4 on web development HTML & CSSgdg_workshop 4 on web development HTML & CSS
gdg_workshop 4 on web development HTML & CSS
SaniyaKhan484230
 
Sass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LASass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LA
Jake Johnson
 
CSS Foundations, pt 2
CSS Foundations, pt 2CSS Foundations, pt 2
CSS Foundations, pt 2
Shawn Calvert
 
Css
CssCss
Css
Balakumaran Arunachalam
 
Organize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS TricksOrganize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS Tricks
Andolasoft Inc
 
CSS for basic learner
CSS for basic learnerCSS for basic learner
CSS for basic learner
Yoeung Vibol
 
Webpage style with CSS
Webpage style with CSSWebpage style with CSS
Webpage style with CSS
Hemant Patidar
 
CSS
CSSCSS
CSS
ARJUN
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
Singsys Pte Ltd
 
CSS Cascade Style Sheet
CSS Cascade Style SheetCSS Cascade Style Sheet
CSS Cascade Style Sheet
Adeel Rasheed
 
CSS Walktrough Internship Course
CSS Walktrough Internship CourseCSS Walktrough Internship Course
CSS Walktrough Internship Course
Zoltan Iszlai
 
Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3
Binu Paul
 
Web Programming& Scripting Lab
Web Programming& Scripting LabWeb Programming& Scripting Lab
Web Programming& Scripting Lab
Swapnali Pawar
 
Cascading Style sheet by Vishal Gour Guest Faculty CSE AUS
Cascading Style sheet by Vishal Gour Guest Faculty  CSE AUSCascading Style sheet by Vishal Gour Guest Faculty  CSE AUS
Cascading Style sheet by Vishal Gour Guest Faculty CSE AUS
ervishalgour
 
CSS-3 Course Slide
CSS-3 Course SlideCSS-3 Course Slide
CSS-3 Course Slide
BoneyGawande
 
Web topic 15 1 basic css layout
Web topic 15 1  basic css layoutWeb topic 15 1  basic css layout
Web topic 15 1 basic css layout
CK Yang
 
CSS For Coders
CSS For CodersCSS For Coders
CSS For Coders
ggfergu
 
gdg_workshop 4 on web development HTML & CSS
gdg_workshop 4 on web development HTML & CSSgdg_workshop 4 on web development HTML & CSS
gdg_workshop 4 on web development HTML & CSS
SaniyaKhan484230
 
Sass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LASass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LA
Jake Johnson
 
CSS Foundations, pt 2
CSS Foundations, pt 2CSS Foundations, pt 2
CSS Foundations, pt 2
Shawn Calvert
 
Organize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS TricksOrganize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS Tricks
Andolasoft Inc
 
CSS for basic learner
CSS for basic learnerCSS for basic learner
CSS for basic learner
Yoeung Vibol
 
Webpage style with CSS
Webpage style with CSSWebpage style with CSS
Webpage style with CSS
Hemant Patidar
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
Singsys Pte Ltd
 
CSS Cascade Style Sheet
CSS Cascade Style SheetCSS Cascade Style Sheet
CSS Cascade Style Sheet
Adeel Rasheed
 
Ad

More from Dr. SURBHI SAROHA (20)

Deep learning(UNIT 3) BY Ms SURBHI SAROHA
Deep learning(UNIT 3) BY Ms SURBHI SAROHADeep learning(UNIT 3) BY Ms SURBHI SAROHA
Deep learning(UNIT 3) BY Ms SURBHI SAROHA
Dr. SURBHI SAROHA
 
MOBILE COMPUTING UNIT 2 by surbhi saroha
MOBILE COMPUTING UNIT 2 by surbhi sarohaMOBILE COMPUTING UNIT 2 by surbhi saroha
MOBILE COMPUTING UNIT 2 by surbhi saroha
Dr. SURBHI SAROHA
 
Mobile Computing UNIT 1 by surbhi saroha
Mobile Computing UNIT 1 by surbhi sarohaMobile Computing UNIT 1 by surbhi saroha
Mobile Computing UNIT 1 by surbhi saroha
Dr. SURBHI SAROHA
 
DEEP LEARNING (UNIT 2 ) by surbhi saroha
DEEP LEARNING (UNIT 2 ) by surbhi sarohaDEEP LEARNING (UNIT 2 ) by surbhi saroha
DEEP LEARNING (UNIT 2 ) by surbhi saroha
Dr. SURBHI SAROHA
 
Introduction to Deep Leaning(UNIT 1).pptx
Introduction to Deep Leaning(UNIT 1).pptxIntroduction to Deep Leaning(UNIT 1).pptx
Introduction to Deep Leaning(UNIT 1).pptx
Dr. SURBHI SAROHA
 
Cloud Computing (Infrastructure as a Service)UNIT 2
Cloud Computing (Infrastructure as a Service)UNIT 2Cloud Computing (Infrastructure as a Service)UNIT 2
Cloud Computing (Infrastructure as a Service)UNIT 2
Dr. SURBHI SAROHA
 
Management Information System(Unit 2).pptx
Management Information System(Unit 2).pptxManagement Information System(Unit 2).pptx
Management Information System(Unit 2).pptx
Dr. SURBHI SAROHA
 
Searching in Data Structure(Linear search and Binary search)
Searching in Data Structure(Linear search and Binary search)Searching in Data Structure(Linear search and Binary search)
Searching in Data Structure(Linear search and Binary search)
Dr. SURBHI SAROHA
 
Management Information System(UNIT 1).pptx
Management Information System(UNIT 1).pptxManagement Information System(UNIT 1).pptx
Management Information System(UNIT 1).pptx
Dr. SURBHI SAROHA
 
Introduction to Cloud Computing(UNIT 1).pptx
Introduction to Cloud Computing(UNIT 1).pptxIntroduction to Cloud Computing(UNIT 1).pptx
Introduction to Cloud Computing(UNIT 1).pptx
Dr. SURBHI SAROHA
 
JAVA (UNIT 5)
JAVA (UNIT 5)JAVA (UNIT 5)
JAVA (UNIT 5)
Dr. SURBHI SAROHA
 
DBMS (UNIT 5)
DBMS (UNIT 5)DBMS (UNIT 5)
DBMS (UNIT 5)
Dr. SURBHI SAROHA
 
DBMS UNIT 4
DBMS UNIT 4DBMS UNIT 4
DBMS UNIT 4
Dr. SURBHI SAROHA
 
JAVA(UNIT 4)
JAVA(UNIT 4)JAVA(UNIT 4)
JAVA(UNIT 4)
Dr. SURBHI SAROHA
 
OOPs & C++(UNIT 5)
OOPs & C++(UNIT 5)OOPs & C++(UNIT 5)
OOPs & C++(UNIT 5)
Dr. SURBHI SAROHA
 
OOPS & C++(UNIT 4)
OOPS & C++(UNIT 4)OOPS & C++(UNIT 4)
OOPS & C++(UNIT 4)
Dr. SURBHI SAROHA
 
DBMS UNIT 3
DBMS UNIT 3DBMS UNIT 3
DBMS UNIT 3
Dr. SURBHI SAROHA
 
JAVA (UNIT 3)
JAVA (UNIT 3)JAVA (UNIT 3)
JAVA (UNIT 3)
Dr. SURBHI SAROHA
 
Keys in dbms(UNIT 2)
Keys in dbms(UNIT 2)Keys in dbms(UNIT 2)
Keys in dbms(UNIT 2)
Dr. SURBHI SAROHA
 
DBMS (UNIT 2)
DBMS (UNIT 2)DBMS (UNIT 2)
DBMS (UNIT 2)
Dr. SURBHI SAROHA
 
Deep learning(UNIT 3) BY Ms SURBHI SAROHA
Deep learning(UNIT 3) BY Ms SURBHI SAROHADeep learning(UNIT 3) BY Ms SURBHI SAROHA
Deep learning(UNIT 3) BY Ms SURBHI SAROHA
Dr. SURBHI SAROHA
 
MOBILE COMPUTING UNIT 2 by surbhi saroha
MOBILE COMPUTING UNIT 2 by surbhi sarohaMOBILE COMPUTING UNIT 2 by surbhi saroha
MOBILE COMPUTING UNIT 2 by surbhi saroha
Dr. SURBHI SAROHA
 
Mobile Computing UNIT 1 by surbhi saroha
Mobile Computing UNIT 1 by surbhi sarohaMobile Computing UNIT 1 by surbhi saroha
Mobile Computing UNIT 1 by surbhi saroha
Dr. SURBHI SAROHA
 
DEEP LEARNING (UNIT 2 ) by surbhi saroha
DEEP LEARNING (UNIT 2 ) by surbhi sarohaDEEP LEARNING (UNIT 2 ) by surbhi saroha
DEEP LEARNING (UNIT 2 ) by surbhi saroha
Dr. SURBHI SAROHA
 
Introduction to Deep Leaning(UNIT 1).pptx
Introduction to Deep Leaning(UNIT 1).pptxIntroduction to Deep Leaning(UNIT 1).pptx
Introduction to Deep Leaning(UNIT 1).pptx
Dr. SURBHI SAROHA
 
Cloud Computing (Infrastructure as a Service)UNIT 2
Cloud Computing (Infrastructure as a Service)UNIT 2Cloud Computing (Infrastructure as a Service)UNIT 2
Cloud Computing (Infrastructure as a Service)UNIT 2
Dr. SURBHI SAROHA
 
Management Information System(Unit 2).pptx
Management Information System(Unit 2).pptxManagement Information System(Unit 2).pptx
Management Information System(Unit 2).pptx
Dr. SURBHI SAROHA
 
Searching in Data Structure(Linear search and Binary search)
Searching in Data Structure(Linear search and Binary search)Searching in Data Structure(Linear search and Binary search)
Searching in Data Structure(Linear search and Binary search)
Dr. SURBHI SAROHA
 
Management Information System(UNIT 1).pptx
Management Information System(UNIT 1).pptxManagement Information System(UNIT 1).pptx
Management Information System(UNIT 1).pptx
Dr. SURBHI SAROHA
 
Introduction to Cloud Computing(UNIT 1).pptx
Introduction to Cloud Computing(UNIT 1).pptxIntroduction to Cloud Computing(UNIT 1).pptx
Introduction to Cloud Computing(UNIT 1).pptx
Dr. SURBHI SAROHA
 
Ad

Recently uploaded (20)

PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
Dr. Nasir Mustafa
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM Mia eStudios
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Junction Field Effect Transistors (JFET)
Junction Field Effect Transistors (JFET)Junction Field Effect Transistors (JFET)
Junction Field Effect Transistors (JFET)
GS Virdi
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 
Kenan Fellows Participants, Projects 2025-26 Cohort
Kenan Fellows Participants, Projects 2025-26 CohortKenan Fellows Participants, Projects 2025-26 Cohort
Kenan Fellows Participants, Projects 2025-26 Cohort
EducationNC
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
Nguyen Thanh Tu Collection
 
dynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south Indiadynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south India
PrachiSontakke5
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
How to Manage Purchase Alternatives in Odoo 18
How to Manage Purchase Alternatives in Odoo 18How to Manage Purchase Alternatives in Odoo 18
How to Manage Purchase Alternatives in Odoo 18
Celine George
 
03#UNTAGGED. Generosity in architecture.
03#UNTAGGED. Generosity in architecture.03#UNTAGGED. Generosity in architecture.
03#UNTAGGED. Generosity in architecture.
MCH
 
APGAR SCORE BY sweety Tamanna Mahapatra MSc Pediatric
APGAR SCORE  BY sweety Tamanna Mahapatra MSc PediatricAPGAR SCORE  BY sweety Tamanna Mahapatra MSc Pediatric
APGAR SCORE BY sweety Tamanna Mahapatra MSc Pediatric
SweetytamannaMohapat
 
Drive Supporter Growth from Awareness to Advocacy with TechSoup Marketing Ser...
Drive Supporter Growth from Awareness to Advocacy with TechSoup Marketing Ser...Drive Supporter Growth from Awareness to Advocacy with TechSoup Marketing Ser...
Drive Supporter Growth from Awareness to Advocacy with TechSoup Marketing Ser...
TechSoup
 
Lecture 1 Introduction history and institutes of entomology_1.pptx
Lecture 1 Introduction history and institutes of entomology_1.pptxLecture 1 Introduction history and institutes of entomology_1.pptx
Lecture 1 Introduction history and institutes of entomology_1.pptx
Arshad Shaikh
 
PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
Dr. Nasir Mustafa
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM Mia eStudios
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Junction Field Effect Transistors (JFET)
Junction Field Effect Transistors (JFET)Junction Field Effect Transistors (JFET)
Junction Field Effect Transistors (JFET)
GS Virdi
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 
Kenan Fellows Participants, Projects 2025-26 Cohort
Kenan Fellows Participants, Projects 2025-26 CohortKenan Fellows Participants, Projects 2025-26 Cohort
Kenan Fellows Participants, Projects 2025-26 Cohort
EducationNC
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
Nguyen Thanh Tu Collection
 
dynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south Indiadynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south India
PrachiSontakke5
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
How to Manage Purchase Alternatives in Odoo 18
How to Manage Purchase Alternatives in Odoo 18How to Manage Purchase Alternatives in Odoo 18
How to Manage Purchase Alternatives in Odoo 18
Celine George
 
03#UNTAGGED. Generosity in architecture.
03#UNTAGGED. Generosity in architecture.03#UNTAGGED. Generosity in architecture.
03#UNTAGGED. Generosity in architecture.
MCH
 
APGAR SCORE BY sweety Tamanna Mahapatra MSc Pediatric
APGAR SCORE  BY sweety Tamanna Mahapatra MSc PediatricAPGAR SCORE  BY sweety Tamanna Mahapatra MSc Pediatric
APGAR SCORE BY sweety Tamanna Mahapatra MSc Pediatric
SweetytamannaMohapat
 
Drive Supporter Growth from Awareness to Advocacy with TechSoup Marketing Ser...
Drive Supporter Growth from Awareness to Advocacy with TechSoup Marketing Ser...Drive Supporter Growth from Awareness to Advocacy with TechSoup Marketing Ser...
Drive Supporter Growth from Awareness to Advocacy with TechSoup Marketing Ser...
TechSoup
 
Lecture 1 Introduction history and institutes of entomology_1.pptx
Lecture 1 Introduction history and institutes of entomology_1.pptxLecture 1 Introduction history and institutes of entomology_1.pptx
Lecture 1 Introduction history and institutes of entomology_1.pptx
Arshad Shaikh
 

Concept of CSS part 2

  • 1. CONCEPT OF CSS PART II BY:SURBHI SAROHA Assistant Professor 1SURBHI SAROHA
  • 2. SYLLABUS  CSS Id and Class.  Box Model(Introduction , Border properties , Padding Properties , Margin properties).  CSS Advanced(Grouping, Dimension , Display , Positioning , Floating , Align , Pseudo class, Navigation Bar , Image Sprites , Attribute sector)  CSS Color 2SURBHI SAROHA
  • 3. CSS Id and Class.  In the CSS, a class selector is a name preceded by a full stop (“.”) and an ID selector is a name preceded by a hash character (“#”).  The difference between an ID and a class is that an ID can be used to identify one element, whereas a class can be used to identify more than one. 3SURBHI SAROHA
  • 4. The CSS id Selector  The id selector uses the id attribute of an HTML element to select a specific element.  The id of an element is unique within a page, so the id selector is used to select one unique element!  To select an element with a specific id, write a hash (#) character, followed by the id of the element. 4SURBHI SAROHA
  • 5. Example  <!DOCTYPE html>  <html>  <head>  <style>  #para1 {  text-align: center;  color: red;  }  </style>  </head>  <body>  <p id="para1">HelloWorld!</p>  <p>This paragraph is not affected by the style.</p>  </body>  </html> 5SURBHI SAROHA
  • 6. The CSS class Selector  The class selector selects HTML elements with a specific class attribute.  To select elements with a specific class, write a period (.) character, followed by the class name. 6SURBHI SAROHA
  • 7. Example  <!DOCTYPE html>  <html>  <head>  <style>  .center {  text-align: center;  color: red;  }  </style>  </head>  <body>  <h1 class="center">Red and center-aligned heading</h1>  <p class="center">Red and center-aligned paragraph.</p>  </body>  </html> 7SURBHI SAROHA
  • 8. Box Model(Introduction , Border properties , Padding Properties , Margin properties).  When laying out a document, the browser's rendering engine represents each element as a rectangular box according to the standard CSS basic box model.  CSS determines the size, position, and properties (color, background, border size, etc.) of these boxes.  Every box is composed of four parts (or areas), defined by their respective edges: the content edge, padding edge, border edge, and margin edge. 8SURBHI SAROHA
  • 10. Cont….  The content area, bounded by the content edge, contains the "real" content of the element, such as text, an image, or a video player. Its dimensions are the content width (or content-box width) and the content height (or content-box height).  It often has a background color or background image.  If the box-sizing property is set to content-box (default) and if the element is a block element, the content area's size can be explicitly defined with the width, min-width, max-width, height, min-height, and max-height properties.  The padding area, bounded by the padding edge, extends the content area to include the element's padding.  Its dimensions are the padding-box width and the padding-box height.  The thickness of the padding is determined by the padding- top, padding-right, padding-bottom, padding-left, and shorthand padding properties. 10SURBHI SAROHA
  • 11. Cont…  The border area, bounded by the border edge, extends the padding area to include the element's borders.  Its dimensions are the border-box width and the border-box height.  The thickness of the borders are determined by the border- width and shorthand border properties.  If the box-sizing property is set to border-box, the border area's size can be explicitly defined with the width, min-width, max- width, height, min-height, and max-height properties.  When there is a background (background-color or background- image) set on a box, it extends to the outer edge of the border (i.e. extends underneath the border in z-ordering).  This default behavior can be altered with the background-clip css property. 11SURBHI SAROHA
  • 12. Cont….  The margin area, bounded by the margin edge, extends the border area to include an empty area used to separate the element from its neighbors.  Its dimensions are the margin-box width and the margin- box height.  The size of the margin area is determined by the margin- top, margin-right, margin-bottom, margin-left, and shorthand margin properties.When margin collapsing occurs, the margin area is not clearly defined since margins are shared between boxes.  Finally, note that for non-replaced inline elements, the amount of space taken up (the contribution to the height of the line) is determined by the line-height property, even though the borders and padding are still displayed around the content. 12SURBHI SAROHA
  • 13. Cont…  Explanation of the different parts:  Content -The content of the box, where text and images appear  Padding - Clears an area around the content. The padding is transparent  Border - A border that goes around the padding and content  Margin - Clears an area outside the border. The margin is transparent 13SURBHI SAROHA
  • 14. Example  <!DOCTYPE html>  <html>  <head>  <style>  div {  background-color: lightgrey;  width: 300px;  border: 15px solid green;  padding: 50px;  margin: 20px;  }  </style>  </head>  <body> 14SURBHI SAROHA
  • 15. Cont…  <h2>Demonstrating the Box Model</h2>  <p>The CSS box model is essentially a box that wraps around every HTML element. It consists of: borders, padding, margins, and the actual content.</p>  <div>This text is the content of the box. We have added a 50px padding, 20px margin and a 15px green border. </div>  </body>  </html> 15SURBHI SAROHA
  • 16. CSS Advanced(Grouping, Dimension , Display , Positioning , Floating , Align , Pseudo class, Navigation Bar , Image Sprites , Attribute sector)  Image Sprites  An image sprite is a collection of images put into a single image.  A web page with many images can take a long time to load and generates multiple server requests.  Using image sprites will reduce the number of server requests and save bandwidth. SURBHI SAROHA 16
  • 17. Cont….  Image Sprites - Simple Example  Instead of using three separate images, we use this single image ("img_navsprites.gif"):  With CSS, we can show just the part of the image we need.  In the following example the CSS specifies which part of the "img_navsprites.gif" image to show: SURBHI SAROHA 17
  • 18. Example  <!DOCTYPE html>  <html>  <head>  <style>  #home {  width: 46px;  height: 44px;  background: url(img_navsprites.gif) 0 0;  }  #next { SURBHI SAROHA 18
  • 19. Cont….  width: 43px;  height: 44px;  background: url(img_navsprites.gif) -91px 0;  }  </style>  </head>  <body>  <img id="home" src="img_trans.gif" width="1" height="1"><br><br>  <img id="next" src="img_trans.gif" width="1" height="1">  </body>  </html> SURBHI SAROHA 19
  • 20. CSS Pseudo-classes  What are Pseudo-classes?  A pseudo-class is used to define a special state of an element.  For example, it can be used to:  Style an element when a user mouses over it  Style visited and unvisited links differently  Style an element when it gets focus SURBHI SAROHA 20
  • 21. Syntax  selector:pseudo-class { property: value; } SURBHI SAROHA 21
  • 22. CSS Navigation Bar  Navigation Bar = List of Links  A navigation bar needs standard HTML as a base.  In our examples we will build the navigation bar from a standard HTML list.  A navigation bar is basically a list of links, so using the <ul> and <li> elements makes perfect sense: SURBHI SAROHA 22
  • 23. Example  <!DOCTYPE html>  <html>  <body>  <ul>  <li><a href="#home">Home</a></li>  <li><a href="#news">News</a></li>  <li><a href="#contact">Contact</a></li>  <li><a href="#about">About</a></li>  </ul>  <p>Note: We use href="#" for test links. In a real web site this would be URLs.</p>  </body>  </html> SURBHI SAROHA 23
  • 24. OUTPUT  Home  News  Contact  About  Note:We use href="#" for test links. In a real web site this would be URLs. SURBHI SAROHA 24
  • 25. Vertical Navigation Bar Examples  <!DOCTYPE html>  <html>  <head>  <style>  ul {  list-style-type: none;  margin: 0;  padding: 0;  width: 200px;  background-color: #f1f1f1;  } SURBHI SAROHA 25
  • 26. Cont….  li a {  display: block;  color: #000;  padding: 8px 16px;  text-decoration: none;  }  /* Change the link color on hover */  li a:hover {  background-color: #555;  color: white;  }  </style>  </head>  <body> SURBHI SAROHA 26
  • 27. CSS Color  Colors are specified using predefined color names, or RGB, HEX, HSL, RGBA, HSLA values.  <!DOCTYPE html>  <html>  <body>  <h1 style="background- color:Tomato;">Tomato</h1>  <h1 style="background- color:Orange;">Orange</h1>  <h1 style="background- color:DodgerBlue;">DodgerBlue</h1> SURBHI SAROHA 27
  • 28. Cont…  <h1 style="background- color:MediumSeaGreen;">MediumSeaGreen</h1>  <h1 style="background-color:Gray;">Gray</h1>  <h1 style="background- color:SlateBlue;">SlateBlue</h1>  <h1 style="background-color:Violet;">Violet</h1>  <h1 style="background- color:LightGray;">LightGray</h1>  </body>  </html> SURBHI SAROHA 28
  • 29. CSS Background Color  <!DOCTYPE html>  <html>  <body>  <h1 style="background-color:DodgerBlue;">HelloWorld</h1>  <p style="background-color:Tomato;">  Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.  Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.  </p>  </body>  </html> SURBHI SAROHA 29
  • 30. CSS Text Color  <!DOCTYPE html>  <html>  <body>  <h3 style="color:Tomato;">HelloWorld</h3>  <p style="color:DodgerBlue;">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>  <p style="color:MediumSeaGreen;">Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>  </body>  </html> SURBHI SAROHA 30
  • 31. CSS Border Color  <!DOCTYPE html>  <html>  <body>  <h1 style="border: 2px solidTomato;">Hello World</h1>  <h1 style="border: 2px solid DodgerBlue;">Hello World</h1>  <h1 style="border: 2px solidViolet;">Hello World</h1>  </body>  </html> SURBHI SAROHA 31