SlideShare a Scribd company logo
COMPUTER SCIENCE
TOPIC : CSS
BY: PRIYANKA PRADHAN
MJPRU
Priyanka Pradhan
What is CSS?
 CSS stands for Cascading Style Sheets
 CSS describes how HTML elements are to be
displayed on screen, paper, or in other media
 CSS saves a lot of work. It can control the layout
of multiple web pages all at once
 External stylesheets are stored in CSS files
Priyanka Pradhan
Why Use CSS?
 CSS is used to define styles for your web
pages, including the design, layout and
variations in display for different devices and
screen sizes.
Priyanka Pradhan
CSS Syntax
 A CSS rule-set consists of a selector and a declaration block:
 The selector points to the HTML element you want to style.
 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.
 A CSS declaration always ends with a semicolon, and
declaration blocks are surrounded by curly braces.
 In the following example all <p> elements will be center-aligned,
with a red text color:
Priyanka Pradhan
 Example
 p {
color: red;
text-align: center;
}
 When a browser reads a style sheet, it will format
the HTML document according to the information
in the style sheet.
Priyanka Pradhan
 body {
background-color: black;
}
h1 {
color: white;
text-align: center;
}
p {
font-family: verdana;
font-size: 20px;
}
Priyanka Pradhan
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: lightblue;
}
h1 {
color: white;
text-align: center;
}
p {
font-family: verdana;
font-size: 20px;
}
</style>
</head>
<body>
<h1>My First CSS Example</h1>
<p>This is a paragraph.</p>
</body>
</html>
Priyanka Pradhan
My First CSS Example
This is a paragraph.
Priyanka Pradhan
Three Ways to Insert CSS
There are three ways of inserting a style sheet:
 External style sheet
 Internal style sheet
 Inline style
Priyanka Pradhan
External Style Sheet
 Each page must include a reference to the
external style sheet file inside the <link>
element.
 The <link> element goes inside the <head>
section.
Priyanka Pradhan
 Example
 <head>
<link rel="stylesheet" type="text/css" href="my
style.css">
</head>
Priyanka Pradhan
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Priyanka Pradhan
 Here is how the "mystyle.css" looks:
body {
background-color: lightblue;
}
h1 {
color: navy;
margin-left: 20px;
}
Priyanka Pradhan
Internal Style Sheet
 An internal style sheet may be used if one
single page has a unique style.
 Internal styles are defined within the <style>
element, inside the <head> section of an
HTML page.
Priyanka Pradhan
 Example
<head>
<style>
body {
background-color: linen;
}
h1 {
color: maroon;
margin-left: 40px;
}
</style>
</head>
Priyanka Pradhan
This is a heading
This is a paragraph
Priyanka Pradhan
Inline Styles
 An inline style may be used to apply a unique
style for a single element.
 To use inline styles, add the style attribute to
the relevant element. The style attribute can
contain any CSS property.
Priyanka Pradhan
 <h1 style="color:blue;margin-left:30px;">This
is a heading</h1>
Priyanka Pradhan
<!DOCTYPE html>
<html>
<body>
<h1 style="color:blue;margin-left:30px;">This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Priyanka Pradhan
Multiple Style Sheets
 If some properties have been defined for the
same selector (element) in different style
sheets, the value from the last read style
sheet will be used.
Priyanka Pradhan
 Assume that an external style sheet has the
following style for the <h1> element:
 h1 {
color: navy;
}
Priyanka Pradhan
 then, assume that an internal style sheet also
has the following style for the <h1> element:
 h1 {
color: orange;
}
Priyanka Pradhan
 If the internal style is defined after the link to
the external style sheet, the <h1> elements
will be "orange"
Priyanka Pradhan
 Example
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
<style>
h1 {
color: orange;
}
</style>
</head>
Priyanka Pradhan
 However, if the internal style is defined before
the link to the external style sheet, the <h1>
elements will be "navy“.
Priyanka Pradhan
 Example
<head>
<style>
h1 {
color: orange;
}
</style>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
Priyanka Pradhan
CSS Colors
 Colors are specified using predefined color
names, or RGB, HEX, HSL, RGBA, HSLA
values.
Priyanka Pradhan
Background Color
 You can set the background color for HTML
elements:
 <h1 style="background-
color:DodgerBlue;">Hello World</h1>
<p style="background-
color:Tomato;">Para1</p>
Priyanka Pradhan
Text Color
 You can set the color of text:
<h1 style="color:Tomato;">Hello</h1>
<p style="color:DodgerBlue;"> World </p>
<p style="color:MediumSeaGreen;">Para1</p>
Priyanka Pradhan
Border Color
 You can set the color of borders:
 <h1 style="border:2px solid Tomato;">Hello
World</h1>
<h1 style="border:2px solid Violet;">Hello
World</h1>
Priyanka Pradhan
CSS Margins
 The CSS margin properties are used to create
space around elements, outside of any
defined borders.
Priyanka Pradhan
CSS has properties for specifying the margin for
each side of an element:
 margin-top
 margin-right
 margin-bottom
 margin-left
Priyanka Pradhan
 Example
p {
margin-top: 100px;
margin-bottom: 100px;
margin-right: 150px;
margin-left: 80px;
}
Priyanka Pradhan
 If the margin property has four values:
 margin: 25px 50px 75px 100px;
 top margin is 25px
 right margin is 50px
 bottom margin is 75px
 left margin is 100px
Priyanka Pradhan
Margin - Shorthand Property
 p {
margin: 25px 50px 75px 100px;
}
Priyanka Pradhan
Styling Links
 Links can be styled with any CSS property
(e.g. color, font-family, background, etc.).
Example
a {
color: hotpink;
}
Priyanka Pradhan
In addition, links can be styled differently depending
on what state they are in.
The four links states are:
 a:link - a normal, unvisited link
 a:visited - a link the user has visited
 a:hover - a link when the user mouses over it
 a:active - a link the moment it is clicked
Priyanka Pradhan
/* unvisited link */
a:link {
color: red;
}
/* visited link */
a:visited {
color: green;
}
/* mouse over link */
a:hover {
color: hotpink;
}
/* selected link */
a:active {
color: blue;
}
Priyanka Pradhan
When setting the style for several link states,
there are some order rules:
 a:hover MUST come after a:link and a:visited
 a:active MUST come after a:hover
Priyanka Pradhan
Text Decoration The text-decoration property is mostly used to remove underlines from
links:
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: underline;
}
Priyanka Pradhan
CSS Text
The color property is used to set the color of the
text. The color is specified by:
 a color name - like "red"
 a HEX value - like "#ff0000"
 an RGB value - like "rgb(255,0,0)"
Priyanka Pradhan
 The default text color for a page is defined in the
body selector.
Example
body {
color: blue;
}
h1 {
color: green;
}
Priyanka Pradhan
Text Alignment
 h1 {
text-align: center;
}
h2 {
text-align: left;
}
h3 {
text-align: right;
}
Priyanka Pradhan
Example
div {
text-align: justify;
}
Priyanka Pradhan
Text Transformation
 The text-transform property is used to specify
uppercase and lowercase letters in a text.
Priyanka Pradhan
Example
p.uppercase {
text-transform: uppercase;
}
p.lowercase {
text-transform: lowercase;
}
p.capitalize {
text-transform: capitalize;
}
Priyanka Pradhan
Text Indentation
 The text-indent property is used to specify the
indentation of the first line of a text.
Priyanka Pradhan
 p {
text-indent: 50px;
}
Priyanka Pradhan
Letter Spacing
 The letter-spacing property is used to specify
the space between the characters in a text.
Priyanka Pradhan
Example
 h1 {
letter-spacing: 3px;
}
h2 {
letter-spacing: -3px;
}
Priyanka Pradhan
Line Height
 The line-height property is used to specify the
space between lines.
Priyanka Pradhan
Example
 p.small {
line-height: 0.8;
}
p.big {
line-height: 1.8;
}
Priyanka Pradhan
Text Direction
 The direction property is used to change the
text direction of an element:
Example
 p {
direction: rtl;
}
Priyanka Pradhan
Word Spacing
 The word-spacing property is used to specify
the space between the words in a text.
Priyanka Pradhan
Example
 h1 {
word-spacing: 10px;
}
h2 {
word-spacing: -5px;
}
Priyanka Pradhan
Text Shadow
 The text-shadow property adds shadow to
text.
Example
 h1 {
text-shadow: 3px 2px red;
}
Priyanka Pradhan
CSS Fonts
 The CSS font properties define the font family,
boldness, size, and the style of a text.
Priyanka Pradhan
Example
 p {
font-family: "Times New Roman", Times,
serif;
}
Priyanka Pradhan
Example
 p.normal {
font-style: normal;
}
p.italic {
font-style: italic;
}
p.oblique {
font-style: oblique;
}
Priyanka Pradhan
Example
 h1 {
font-size: 40px;
}
h2 {
font-size: 30px;
}
p {
font-size: 14px;
}
Priyanka Pradhan
 p.normal {
font-weight: normal;
}
p.thick {
font-weight: bold;
}
Priyanka Pradhan
CSS Lists
 The list-style-type property specifies the type
of list item marker.
Priyanka Pradhan
Example
 ul.a {
list-style-type: circle;
}
ul.b {
list-style-type: square;
}
ol.c {
list-style-type: upper-roman;
}
ol.d {
list-style-type: lower-alpha;
}
Priyanka Pradhan
An Image as The List Item
Marker
 The list-style-image property specifies an
image as the list item marker:
Example
 ul {
list-style-image: url('sqpurple.gif');
}
Priyanka Pradhan
Remove Default Settings
 The list-style-type:none property can also be
used to remove the markers/bullets. Note that
the list also has default margin and padding.
 To remove this, add margin:0 and
 padding:0 to <ul> or <ol>:
Priyanka Pradhan
Example
 ul {
list-style-type: none;
margin: 0;
padding: 0;
}
Priyanka Pradhan
Table Borders
 To specify table borders in CSS, use
the border property.
 The example below specifies a black border
for <table>, <th>, and <td> elements:
Priyanka Pradhan
Example
 table, th, td {
border: 1px solid black;
}
Priyanka Pradhan
Example
 table {
width: 100%;
}
th {
height: 50px;
}
Priyanka Pradhan
Horizontal Alignment
 The text-align property sets the horizontal
alignment (like left, right, or center) of the
content in <th> or <td>.
 By default, the content of <th> elements are
center-aligned and the content of <td>
elements are left-aligned.
Priyanka Pradhan
Example
 th {
text-align: left;
}
Priyanka Pradhan
Vertical Alignment
 The vertical-align property sets the vertical
alignment (like top, bottom, or middle) of the
content in <th> or <td>.
 By default, the vertical alignment of the
content in a table is middle (for both <th> and
<td> elements).
Priyanka Pradhan
Example
 td {
height: 50px;
vertical-align: bottom;
}
Priyanka Pradhan
Table Padding
 To control the space between the border and
the content in a table, use
the padding property on <td> and <th>
elements.
Priyanka Pradhan
Example
 th, td {
padding: 15px;
text-align: left;
}
Priyanka Pradhan
Ad

More Related Content

What's hot (20)

FYBSC IT Web Programming Unit III Document Object
FYBSC IT Web Programming Unit III  Document ObjectFYBSC IT Web Programming Unit III  Document Object
FYBSC IT Web Programming Unit III Document Object
Arti Parab Academics
 
Html basic
Html basicHtml basic
Html basic
Viccky Khairnar
 
Html
HtmlHtml
Html
B. Randhir Prasad Yadav
 
Html
HtmlHtml
Html
Bhumika Ratan
 
HTML presentation for beginners
HTML presentation for beginnersHTML presentation for beginners
HTML presentation for beginners
jeroenvdmeer
 
HTML and CSS part 2
HTML and CSS part 2HTML and CSS part 2
HTML and CSS part 2
Julie Iskander
 
Html
HtmlHtml
Html
Nisa Soomro
 
HyperText Markup Language - HTML
HyperText Markup Language - HTMLHyperText Markup Language - HTML
HyperText Markup Language - HTML
Sun Technlogies
 
HTML Web design english & sinhala mix note
HTML Web design english & sinhala mix noteHTML Web design english & sinhala mix note
HTML Web design english & sinhala mix note
Mahinda Gamage
 
Html5 attributes
Html5  attributesHtml5  attributes
Html5 attributes
AbhishekMondal42
 
PHP HTML CSS Notes
PHP HTML CSS  NotesPHP HTML CSS  Notes
PHP HTML CSS Notes
Tushar Rajput
 
Web development using html 5
Web development using html 5Web development using html 5
Web development using html 5
Anjan Mahanta
 
HTML
HTMLHTML
HTML
Akash Varaiya
 
HTML practical file
HTML practical fileHTML practical file
HTML practical file
Kuldeep Sharma
 
LEARN HTML IN A DAY
LEARN HTML IN A DAYLEARN HTML IN A DAY
LEARN HTML IN A DAY
AWK Internet Technologies
 
Html.docx
Html.docxHtml.docx
Html.docx
Noman Ali
 
Basic html
Basic htmlBasic html
Basic html
Nicha Jutasirivongse
 
Learn html elements and structure cheatsheet codecademy
Learn html  elements and structure cheatsheet   codecademyLearn html  elements and structure cheatsheet   codecademy
Learn html elements and structure cheatsheet codecademy
nirmalamanjunath
 
Intro to Javascript and jQuery
Intro to Javascript and jQueryIntro to Javascript and jQuery
Intro to Javascript and jQuery
Shawn Calvert
 
Class 10th FIT Practical File(HTML)
Class 10th FIT Practical File(HTML)Class 10th FIT Practical File(HTML)
Class 10th FIT Practical File(HTML)
Anushka Rai
 

Similar to Css (20)

Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
VARSHAKUMARI49
 
"Innovative Web Design & Development Hub
"Innovative Web Design & Development Hub"Innovative Web Design & Development Hub
"Innovative Web Design & Development Hub
kyereernest560
 
TUTORIAL DE CSS 2.0
TUTORIAL DE CSS 2.0TUTORIAL DE CSS 2.0
TUTORIAL DE CSS 2.0
Vladimir Valencia
 
Css1
Css1Css1
Css1
Pulkit Tanwar
 
Css introduction
Css  introductionCss  introduction
Css introduction
vishnu murthy
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Folasade Adedeji
 
html-css
html-csshtml-css
html-css
Dhirendra Chauhan
 
LIS3353 SP12 Week 13
LIS3353 SP12 Week 13LIS3353 SP12 Week 13
LIS3353 SP12 Week 13
Amanda Case
 
5th Lecture- WEB ENGINEERING basics.pptx
5th Lecture- WEB ENGINEERING basics.pptx5th Lecture- WEB ENGINEERING basics.pptx
5th Lecture- WEB ENGINEERING basics.pptx
Aasma13
 
LECTURE 3 - Introduction to CSS_084137.pptx
LECTURE 3 - Introduction to CSS_084137.pptxLECTURE 3 - Introduction to CSS_084137.pptx
LECTURE 3 - Introduction to CSS_084137.pptx
josephatmgimba
 
Introduction to css by programmerblog.net
Introduction to css by programmerblog.netIntroduction to css by programmerblog.net
Introduction to css by programmerblog.net
Programmer Blog
 
Html 2
Html   2Html   2
Html 2
pavishkumarsingh
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
M Vishnuvardhan Reddy
 
cascading style sheets ppt.sildeshower phone view
cascading style sheets ppt.sildeshower phone viewcascading style sheets ppt.sildeshower phone view
cascading style sheets ppt.sildeshower phone view
kedaringle994
 
v5-introduction to html-css-210321161444.pptx
v5-introduction to html-css-210321161444.pptxv5-introduction to html-css-210321161444.pptx
v5-introduction to html-css-210321161444.pptx
hannahroseline2
 
v5-introduction to html-css-210321161444.pptx
v5-introduction to html-css-210321161444.pptxv5-introduction to html-css-210321161444.pptx
v5-introduction to html-css-210321161444.pptx
hannahroseline2
 
Unitegergergegegegetgegegegegegeg-2-CSS.pptx
Unitegergergegegegetgegegegegegeg-2-CSS.pptxUnitegergergegegegetgegegegegegeg-2-CSS.pptx
Unitegergergegegegetgegegegegegeg-2-CSS.pptx
VikasTuwar1
 
Styling and Navigation with HTML and CSS
Styling and Navigation with HTML and CSSStyling and Navigation with HTML and CSS
Styling and Navigation with HTML and CSS
JM PALEN
 
CSS notes
CSS notesCSS notes
CSS notes
Rajendra Prasad
 
css-ppt.pdf
css-ppt.pdfcss-ppt.pdf
css-ppt.pdf
EktaDesai14
 
"Innovative Web Design & Development Hub
"Innovative Web Design & Development Hub"Innovative Web Design & Development Hub
"Innovative Web Design & Development Hub
kyereernest560
 
LIS3353 SP12 Week 13
LIS3353 SP12 Week 13LIS3353 SP12 Week 13
LIS3353 SP12 Week 13
Amanda Case
 
5th Lecture- WEB ENGINEERING basics.pptx
5th Lecture- WEB ENGINEERING basics.pptx5th Lecture- WEB ENGINEERING basics.pptx
5th Lecture- WEB ENGINEERING basics.pptx
Aasma13
 
LECTURE 3 - Introduction to CSS_084137.pptx
LECTURE 3 - Introduction to CSS_084137.pptxLECTURE 3 - Introduction to CSS_084137.pptx
LECTURE 3 - Introduction to CSS_084137.pptx
josephatmgimba
 
Introduction to css by programmerblog.net
Introduction to css by programmerblog.netIntroduction to css by programmerblog.net
Introduction to css by programmerblog.net
Programmer Blog
 
cascading style sheets ppt.sildeshower phone view
cascading style sheets ppt.sildeshower phone viewcascading style sheets ppt.sildeshower phone view
cascading style sheets ppt.sildeshower phone view
kedaringle994
 
v5-introduction to html-css-210321161444.pptx
v5-introduction to html-css-210321161444.pptxv5-introduction to html-css-210321161444.pptx
v5-introduction to html-css-210321161444.pptx
hannahroseline2
 
v5-introduction to html-css-210321161444.pptx
v5-introduction to html-css-210321161444.pptxv5-introduction to html-css-210321161444.pptx
v5-introduction to html-css-210321161444.pptx
hannahroseline2
 
Unitegergergegegegetgegegegegegeg-2-CSS.pptx
Unitegergergegegegetgegegegegegeg-2-CSS.pptxUnitegergergegegegetgegegegegegeg-2-CSS.pptx
Unitegergergegegegetgegegegegegeg-2-CSS.pptx
VikasTuwar1
 
Styling and Navigation with HTML and CSS
Styling and Navigation with HTML and CSSStyling and Navigation with HTML and CSS
Styling and Navigation with HTML and CSS
JM PALEN
 
Ad

More from Priyanka Pradhan (18)

Tomato disease detection using deep learning convolutional neural network
Tomato disease detection using deep learning convolutional neural networkTomato disease detection using deep learning convolutional neural network
Tomato disease detection using deep learning convolutional neural network
Priyanka Pradhan
 
Applet
AppletApplet
Applet
Priyanka Pradhan
 
Servlet
ServletServlet
Servlet
Priyanka Pradhan
 
Javascript
JavascriptJavascript
Javascript
Priyanka Pradhan
 
programming with python ppt
programming with python pptprogramming with python ppt
programming with python ppt
Priyanka Pradhan
 
Core Java
Core JavaCore Java
Core Java
Priyanka Pradhan
 
Image Processing Based Signature Recognition and Verification Technique Using...
Image Processing Based Signature Recognition and Verification Technique Using...Image Processing Based Signature Recognition and Verification Technique Using...
Image Processing Based Signature Recognition and Verification Technique Using...
Priyanka Pradhan
 
GrayBox Testing and Crud Testing By: Er. Priyanka Pradhan
GrayBox Testing and Crud Testing By: Er. Priyanka PradhanGrayBox Testing and Crud Testing By: Er. Priyanka Pradhan
GrayBox Testing and Crud Testing By: Er. Priyanka Pradhan
Priyanka Pradhan
 
The agile requirements refinery(SRUM) by: Priyanka Pradhan
The agile requirements refinery(SRUM) by: Priyanka PradhanThe agile requirements refinery(SRUM) by: Priyanka Pradhan
The agile requirements refinery(SRUM) by: Priyanka Pradhan
Priyanka Pradhan
 
Social tagging and its trend
Social tagging and its trendSocial tagging and its trend
Social tagging and its trend
Priyanka Pradhan
 
Behavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanBehavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka Pradhan
Priyanka Pradhan
 
software product and its characteristics
software product and its characteristicssoftware product and its characteristics
software product and its characteristics
Priyanka Pradhan
 
EDI(ELECTRONIC DATA INTERCHANGE)
EDI(ELECTRONIC DATA INTERCHANGE)EDI(ELECTRONIC DATA INTERCHANGE)
EDI(ELECTRONIC DATA INTERCHANGE)
Priyanka Pradhan
 
collaborative tagging :-by Er. Priyanka Pradhan
collaborative tagging :-by Er. Priyanka Pradhancollaborative tagging :-by Er. Priyanka Pradhan
collaborative tagging :-by Er. Priyanka Pradhan
Priyanka Pradhan
 
Deploying java beans in jsp
Deploying java beans in jspDeploying java beans in jsp
Deploying java beans in jsp
Priyanka Pradhan
 
SOFTWARE PROCESS MONITORING AND AUDIT
SOFTWARE PROCESS MONITORING AND AUDITSOFTWARE PROCESS MONITORING AND AUDIT
SOFTWARE PROCESS MONITORING AND AUDIT
Priyanka Pradhan
 
Pcmm
PcmmPcmm
Pcmm
Priyanka Pradhan
 
s/w metrics monitoring and control
s/w metrics monitoring and controls/w metrics monitoring and control
s/w metrics monitoring and control
Priyanka Pradhan
 
Tomato disease detection using deep learning convolutional neural network
Tomato disease detection using deep learning convolutional neural networkTomato disease detection using deep learning convolutional neural network
Tomato disease detection using deep learning convolutional neural network
Priyanka Pradhan
 
programming with python ppt
programming with python pptprogramming with python ppt
programming with python ppt
Priyanka Pradhan
 
Image Processing Based Signature Recognition and Verification Technique Using...
Image Processing Based Signature Recognition and Verification Technique Using...Image Processing Based Signature Recognition and Verification Technique Using...
Image Processing Based Signature Recognition and Verification Technique Using...
Priyanka Pradhan
 
GrayBox Testing and Crud Testing By: Er. Priyanka Pradhan
GrayBox Testing and Crud Testing By: Er. Priyanka PradhanGrayBox Testing and Crud Testing By: Er. Priyanka Pradhan
GrayBox Testing and Crud Testing By: Er. Priyanka Pradhan
Priyanka Pradhan
 
The agile requirements refinery(SRUM) by: Priyanka Pradhan
The agile requirements refinery(SRUM) by: Priyanka PradhanThe agile requirements refinery(SRUM) by: Priyanka Pradhan
The agile requirements refinery(SRUM) by: Priyanka Pradhan
Priyanka Pradhan
 
Social tagging and its trend
Social tagging and its trendSocial tagging and its trend
Social tagging and its trend
Priyanka Pradhan
 
Behavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanBehavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka Pradhan
Priyanka Pradhan
 
software product and its characteristics
software product and its characteristicssoftware product and its characteristics
software product and its characteristics
Priyanka Pradhan
 
EDI(ELECTRONIC DATA INTERCHANGE)
EDI(ELECTRONIC DATA INTERCHANGE)EDI(ELECTRONIC DATA INTERCHANGE)
EDI(ELECTRONIC DATA INTERCHANGE)
Priyanka Pradhan
 
collaborative tagging :-by Er. Priyanka Pradhan
collaborative tagging :-by Er. Priyanka Pradhancollaborative tagging :-by Er. Priyanka Pradhan
collaborative tagging :-by Er. Priyanka Pradhan
Priyanka Pradhan
 
Deploying java beans in jsp
Deploying java beans in jspDeploying java beans in jsp
Deploying java beans in jsp
Priyanka Pradhan
 
SOFTWARE PROCESS MONITORING AND AUDIT
SOFTWARE PROCESS MONITORING AND AUDITSOFTWARE PROCESS MONITORING AND AUDIT
SOFTWARE PROCESS MONITORING AND AUDIT
Priyanka Pradhan
 
s/w metrics monitoring and control
s/w metrics monitoring and controls/w metrics monitoring and control
s/w metrics monitoring and control
Priyanka Pradhan
 
Ad

Recently uploaded (20)

Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Journal of Soft Computing in Civil Engineering
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)
rccbatchplant
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Journal of Soft Computing in Civil Engineering
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
inmishra17121973
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
π0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalizationπ0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalization
NABLAS株式会社
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)
rccbatchplant
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
inmishra17121973
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
π0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalizationπ0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalization
NABLAS株式会社
 

Css

  • 1. COMPUTER SCIENCE TOPIC : CSS BY: PRIYANKA PRADHAN MJPRU Priyanka Pradhan
  • 2. What is CSS?  CSS stands for Cascading Style Sheets  CSS describes how HTML elements are to be displayed on screen, paper, or in other media  CSS saves a lot of work. It can control the layout of multiple web pages all at once  External stylesheets are stored in CSS files Priyanka Pradhan
  • 3. Why Use CSS?  CSS is used to define styles for your web pages, including the design, layout and variations in display for different devices and screen sizes. Priyanka Pradhan
  • 4. CSS Syntax  A CSS rule-set consists of a selector and a declaration block:  The selector points to the HTML element you want to style.  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.  A CSS declaration always ends with a semicolon, and declaration blocks are surrounded by curly braces.  In the following example all <p> elements will be center-aligned, with a red text color: Priyanka Pradhan
  • 5.  Example  p { color: red; text-align: center; }  When a browser reads a style sheet, it will format the HTML document according to the information in the style sheet. Priyanka Pradhan
  • 6.  body { background-color: black; } h1 { color: white; text-align: center; } p { font-family: verdana; font-size: 20px; } Priyanka Pradhan
  • 7. <!DOCTYPE html> <html> <head> <style> body { background-color: lightblue; } h1 { color: white; text-align: center; } p { font-family: verdana; font-size: 20px; } </style> </head> <body> <h1>My First CSS Example</h1> <p>This is a paragraph.</p> </body> </html> Priyanka Pradhan
  • 8. My First CSS Example This is a paragraph. Priyanka Pradhan
  • 9. Three Ways to Insert CSS There are three ways of inserting a style sheet:  External style sheet  Internal style sheet  Inline style Priyanka Pradhan
  • 10. External Style Sheet  Each page must include a reference to the external style sheet file inside the <link> element.  The <link> element goes inside the <head> section. Priyanka Pradhan
  • 11.  Example  <head> <link rel="stylesheet" type="text/css" href="my style.css"> </head> Priyanka Pradhan
  • 12. <!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="mystyle.css"> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html> Priyanka Pradhan
  • 13.  Here is how the "mystyle.css" looks: body { background-color: lightblue; } h1 { color: navy; margin-left: 20px; } Priyanka Pradhan
  • 14. Internal Style Sheet  An internal style sheet may be used if one single page has a unique style.  Internal styles are defined within the <style> element, inside the <head> section of an HTML page. Priyanka Pradhan
  • 15.  Example <head> <style> body { background-color: linen; } h1 { color: maroon; margin-left: 40px; } </style> </head> Priyanka Pradhan
  • 16. This is a heading This is a paragraph Priyanka Pradhan
  • 17. Inline Styles  An inline style may be used to apply a unique style for a single element.  To use inline styles, add the style attribute to the relevant element. The style attribute can contain any CSS property. Priyanka Pradhan
  • 18.  <h1 style="color:blue;margin-left:30px;">This is a heading</h1> Priyanka Pradhan
  • 19. <!DOCTYPE html> <html> <body> <h1 style="color:blue;margin-left:30px;">This is a heading</h1> <p>This is a paragraph.</p> </body> </html> Priyanka Pradhan
  • 20. Multiple Style Sheets  If some properties have been defined for the same selector (element) in different style sheets, the value from the last read style sheet will be used. Priyanka Pradhan
  • 21.  Assume that an external style sheet has the following style for the <h1> element:  h1 { color: navy; } Priyanka Pradhan
  • 22.  then, assume that an internal style sheet also has the following style for the <h1> element:  h1 { color: orange; } Priyanka Pradhan
  • 23.  If the internal style is defined after the link to the external style sheet, the <h1> elements will be "orange" Priyanka Pradhan
  • 24.  Example <head> <link rel="stylesheet" type="text/css" href="mystyle.css"> <style> h1 { color: orange; } </style> </head> Priyanka Pradhan
  • 25.  However, if the internal style is defined before the link to the external style sheet, the <h1> elements will be "navy“. Priyanka Pradhan
  • 26.  Example <head> <style> h1 { color: orange; } </style> <link rel="stylesheet" type="text/css" href="mystyle.css"> </head> Priyanka Pradhan
  • 27. CSS Colors  Colors are specified using predefined color names, or RGB, HEX, HSL, RGBA, HSLA values. Priyanka Pradhan
  • 28. Background Color  You can set the background color for HTML elements:  <h1 style="background- color:DodgerBlue;">Hello World</h1> <p style="background- color:Tomato;">Para1</p> Priyanka Pradhan
  • 29. Text Color  You can set the color of text: <h1 style="color:Tomato;">Hello</h1> <p style="color:DodgerBlue;"> World </p> <p style="color:MediumSeaGreen;">Para1</p> Priyanka Pradhan
  • 30. Border Color  You can set the color of borders:  <h1 style="border:2px solid Tomato;">Hello World</h1> <h1 style="border:2px solid Violet;">Hello World</h1> Priyanka Pradhan
  • 31. CSS Margins  The CSS margin properties are used to create space around elements, outside of any defined borders. Priyanka Pradhan
  • 32. CSS has properties for specifying the margin for each side of an element:  margin-top  margin-right  margin-bottom  margin-left Priyanka Pradhan
  • 33.  Example p { margin-top: 100px; margin-bottom: 100px; margin-right: 150px; margin-left: 80px; } Priyanka Pradhan
  • 34.  If the margin property has four values:  margin: 25px 50px 75px 100px;  top margin is 25px  right margin is 50px  bottom margin is 75px  left margin is 100px Priyanka Pradhan
  • 35. Margin - Shorthand Property  p { margin: 25px 50px 75px 100px; } Priyanka Pradhan
  • 36. Styling Links  Links can be styled with any CSS property (e.g. color, font-family, background, etc.). Example a { color: hotpink; } Priyanka Pradhan
  • 37. In addition, links can be styled differently depending on what state they are in. The four links states are:  a:link - a normal, unvisited link  a:visited - a link the user has visited  a:hover - a link when the user mouses over it  a:active - a link the moment it is clicked Priyanka Pradhan
  • 38. /* unvisited link */ a:link { color: red; } /* visited link */ a:visited { color: green; } /* mouse over link */ a:hover { color: hotpink; } /* selected link */ a:active { color: blue; } Priyanka Pradhan
  • 39. When setting the style for several link states, there are some order rules:  a:hover MUST come after a:link and a:visited  a:active MUST come after a:hover Priyanka Pradhan
  • 40. Text Decoration The text-decoration property is mostly used to remove underlines from links: a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: underline; } a:active { text-decoration: underline; } Priyanka Pradhan
  • 41. CSS Text The color property is used to set the color of the text. The color is specified by:  a color name - like "red"  a HEX value - like "#ff0000"  an RGB value - like "rgb(255,0,0)" Priyanka Pradhan
  • 42.  The default text color for a page is defined in the body selector. Example body { color: blue; } h1 { color: green; } Priyanka Pradhan
  • 43. Text Alignment  h1 { text-align: center; } h2 { text-align: left; } h3 { text-align: right; } Priyanka Pradhan
  • 45. Text Transformation  The text-transform property is used to specify uppercase and lowercase letters in a text. Priyanka Pradhan
  • 46. Example p.uppercase { text-transform: uppercase; } p.lowercase { text-transform: lowercase; } p.capitalize { text-transform: capitalize; } Priyanka Pradhan
  • 47. Text Indentation  The text-indent property is used to specify the indentation of the first line of a text. Priyanka Pradhan
  • 48.  p { text-indent: 50px; } Priyanka Pradhan
  • 49. Letter Spacing  The letter-spacing property is used to specify the space between the characters in a text. Priyanka Pradhan
  • 50. Example  h1 { letter-spacing: 3px; } h2 { letter-spacing: -3px; } Priyanka Pradhan
  • 51. Line Height  The line-height property is used to specify the space between lines. Priyanka Pradhan
  • 52. Example  p.small { line-height: 0.8; } p.big { line-height: 1.8; } Priyanka Pradhan
  • 53. Text Direction  The direction property is used to change the text direction of an element: Example  p { direction: rtl; } Priyanka Pradhan
  • 54. Word Spacing  The word-spacing property is used to specify the space between the words in a text. Priyanka Pradhan
  • 55. Example  h1 { word-spacing: 10px; } h2 { word-spacing: -5px; } Priyanka Pradhan
  • 56. Text Shadow  The text-shadow property adds shadow to text. Example  h1 { text-shadow: 3px 2px red; } Priyanka Pradhan
  • 57. CSS Fonts  The CSS font properties define the font family, boldness, size, and the style of a text. Priyanka Pradhan
  • 58. Example  p { font-family: "Times New Roman", Times, serif; } Priyanka Pradhan
  • 59. Example  p.normal { font-style: normal; } p.italic { font-style: italic; } p.oblique { font-style: oblique; } Priyanka Pradhan
  • 60. Example  h1 { font-size: 40px; } h2 { font-size: 30px; } p { font-size: 14px; } Priyanka Pradhan
  • 61.  p.normal { font-weight: normal; } p.thick { font-weight: bold; } Priyanka Pradhan
  • 62. CSS Lists  The list-style-type property specifies the type of list item marker. Priyanka Pradhan
  • 63. Example  ul.a { list-style-type: circle; } ul.b { list-style-type: square; } ol.c { list-style-type: upper-roman; } ol.d { list-style-type: lower-alpha; } Priyanka Pradhan
  • 64. An Image as The List Item Marker  The list-style-image property specifies an image as the list item marker: Example  ul { list-style-image: url('sqpurple.gif'); } Priyanka Pradhan
  • 65. Remove Default Settings  The list-style-type:none property can also be used to remove the markers/bullets. Note that the list also has default margin and padding.  To remove this, add margin:0 and  padding:0 to <ul> or <ol>: Priyanka Pradhan
  • 66. Example  ul { list-style-type: none; margin: 0; padding: 0; } Priyanka Pradhan
  • 67. Table Borders  To specify table borders in CSS, use the border property.  The example below specifies a black border for <table>, <th>, and <td> elements: Priyanka Pradhan
  • 68. Example  table, th, td { border: 1px solid black; } Priyanka Pradhan
  • 69. Example  table { width: 100%; } th { height: 50px; } Priyanka Pradhan
  • 70. Horizontal Alignment  The text-align property sets the horizontal alignment (like left, right, or center) of the content in <th> or <td>.  By default, the content of <th> elements are center-aligned and the content of <td> elements are left-aligned. Priyanka Pradhan
  • 71. Example  th { text-align: left; } Priyanka Pradhan
  • 72. Vertical Alignment  The vertical-align property sets the vertical alignment (like top, bottom, or middle) of the content in <th> or <td>.  By default, the vertical alignment of the content in a table is middle (for both <th> and <td> elements). Priyanka Pradhan
  • 73. Example  td { height: 50px; vertical-align: bottom; } Priyanka Pradhan
  • 74. Table Padding  To control the space between the border and the content in a table, use the padding property on <td> and <th> elements. Priyanka Pradhan
  • 75. Example  th, td { padding: 15px; text-align: left; } Priyanka Pradhan