SlideShare une entreprise Scribd logo
1  sur  6
Unit III: Adding Styles
and Interactivity Using
  CSS and Javascript
CSS Font Properties
• The CSS Font Properties allow
  you to specify the font
  characteristic such as
  fonts, font size, font style, etc.
Property        Description                Example
font-family       Specifies the font      h1{font-family:
                  family for text         arial, verdana, sans-
                                          serif;}
                                          h2{font-family:
                                          garamond, serif;}
                                          h3{font-family:
                                          Courier, monospace;}

font-size         Specifies the font size h1{font-size: 25px;}
                  of text                 h2{font-size: 13pt;}
                  Value: pixel, point or h3{font-size: 115%}
                  percentage


font-style        Specifies the font style h1{font-style:
                  for text                 oblique;}
                  Value:                   h2{font-style: italic
                  normal, oblique, or
                  italic
Property     Description               Example
font-variant      Specifies whether or    h1{font-variant:
                  not a text should be    small-caps;}
                  displayed in a small-   h1{font-variant:
                  caps font or normal     normal;}
                  font

font-weight       Specifies the weight h1{font-weight:
                  of a font to normal  bold;}
                  or bold              h1{font-weight:
                                       normal;}


font              Sets all the font       h1{font: oblique
                  properties in one       bold 20px “Times
                  declaration             New Roman”, sans
                                          serif;}
COMPUQUIZ
1. Write the CSS code to set the font to Broadway.
2. Write the CSS code to set the font size to 16pt.
3. Write the CSS code to set the font style to italic.
4. Write the CSS code to set the font to small caps.
5. Write the CSS code to set the font to bold.
6. Write the CSS code to set 1-5 in one declaration.
Answer
• 1.body{font-family:broadway;}
2. body{font-size: 16pt;}
• 3.body{font-style: italic;}
• 4. body{font-variant:small-caps;}
• Body{font-weight: bold;}
• Body{font : broadway 16pt italic small-caps
  bold;}

Contenu connexe

Tendances (20)

html-css
html-csshtml-css
html-css
 
Css backgrounds
Css   backgroundsCss   backgrounds
Css backgrounds
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
 
HTML5 - Forms
HTML5 - FormsHTML5 - Forms
HTML5 - Forms
 
Css
CssCss
Css
 
CSS Font & Text style
CSS Font & Text style CSS Font & Text style
CSS Font & Text style
 
What is CSS?
What is CSS?What is CSS?
What is CSS?
 
CSS
CSSCSS
CSS
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
 
CSS - Text Properties
CSS - Text PropertiesCSS - Text Properties
CSS - Text Properties
 
Flex box
Flex boxFlex box
Flex box
 
Id and class selector
Id and class selectorId and class selector
Id and class selector
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) help
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
 
Up to Speed on HTML 5 and CSS 3
Up to Speed on HTML 5 and CSS 3Up to Speed on HTML 5 and CSS 3
Up to Speed on HTML 5 and CSS 3
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive Design
 
Html5 and-css3-overview
Html5 and-css3-overviewHtml5 and-css3-overview
Html5 and-css3-overview
 
CSS selectors
CSS selectorsCSS selectors
CSS selectors
 

Similaire à Css font properties

Formating Text Using CSS
Formating Text Using CSSFormating Text Using CSS
Formating Text Using CSSMark Carter
 
Castro Chapter 10
Castro Chapter 10Castro Chapter 10
Castro Chapter 10Jeff Byrnes
 
Chapter 12: CSS Part 2
Chapter 12: CSS Part 2Chapter 12: CSS Part 2
Chapter 12: CSS Part 2Steve Guinan
 
5th Lecture- WEB ENGINEERING basics.pptx
5th Lecture- WEB ENGINEERING basics.pptx5th Lecture- WEB ENGINEERING basics.pptx
5th Lecture- WEB ENGINEERING basics.pptxAasma13
 
Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3Gheyath M. Othman
 
CSS LINE HEIGHT
CSS LINE HEIGHTCSS LINE HEIGHT
CSS LINE HEIGHTAnuradha
 
7.2 external style sheets
7.2 external style sheets7.2 external style sheets
7.2 external style sheetsBulldogs83
 
CSS properties.docx
CSS properties.docxCSS properties.docx
CSS properties.docxbantisworld
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSSLarry King
 
Css border and outline properties
Css border and outline propertiesCss border and outline properties
Css border and outline propertiesJesus Obenita Jr.
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete NotesEPAM Systems
 
Content style in html with example - PhpGurukul Tutorials
Content style in html with example - PhpGurukul TutorialsContent style in html with example - PhpGurukul Tutorials
Content style in html with example - PhpGurukul TutorialsPHPGurukul Blog
 
CSS_Day_Two (W3schools)
CSS_Day_Two (W3schools)CSS_Day_Two (W3schools)
CSS_Day_Two (W3schools)Rafi Haidari
 
Cascading style sheet part 2
Cascading style sheet   part 2Cascading style sheet   part 2
Cascading style sheet part 2Himanshu Pathak
 

Similaire à Css font properties (20)

Css1 properties
Css1 propertiesCss1 properties
Css1 properties
 
Css text property
Css text propertyCss text property
Css text property
 
Estilos Css
Estilos CssEstilos Css
Estilos Css
 
Formating Text Using CSS
Formating Text Using CSSFormating Text Using CSS
Formating Text Using CSS
 
Castro Chapter 10
Castro Chapter 10Castro Chapter 10
Castro Chapter 10
 
Styling Text With CSS
Styling Text With CSSStyling Text With CSS
Styling Text With CSS
 
Chapter 12: CSS Part 2
Chapter 12: CSS Part 2Chapter 12: CSS Part 2
Chapter 12: CSS Part 2
 
Css1 properties
Css1 propertiesCss1 properties
Css1 properties
 
5th Lecture- WEB ENGINEERING basics.pptx
5th Lecture- WEB ENGINEERING basics.pptx5th Lecture- WEB ENGINEERING basics.pptx
5th Lecture- WEB ENGINEERING basics.pptx
 
Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3
 
Line Height
Line HeightLine Height
Line Height
 
CSS LINE HEIGHT
CSS LINE HEIGHTCSS LINE HEIGHT
CSS LINE HEIGHT
 
7.2 external style sheets
7.2 external style sheets7.2 external style sheets
7.2 external style sheets
 
CSS properties.docx
CSS properties.docxCSS properties.docx
CSS properties.docx
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Css border and outline properties
Css border and outline propertiesCss border and outline properties
Css border and outline properties
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete Notes
 
Content style in html with example - PhpGurukul Tutorials
Content style in html with example - PhpGurukul TutorialsContent style in html with example - PhpGurukul Tutorials
Content style in html with example - PhpGurukul Tutorials
 
CSS_Day_Two (W3schools)
CSS_Day_Two (W3schools)CSS_Day_Two (W3schools)
CSS_Day_Two (W3schools)
 
Cascading style sheet part 2
Cascading style sheet   part 2Cascading style sheet   part 2
Cascading style sheet part 2
 

Plus de Jesus Obenita Jr.

Plus de Jesus Obenita Jr. (20)

Organization and management 3 a Evolution of Management Theory
Organization and management 3 a Evolution of Management TheoryOrganization and management 3 a Evolution of Management Theory
Organization and management 3 a Evolution of Management Theory
 
Organization and management 2 Management Function
Organization and management 2 Management FunctionOrganization and management 2 Management Function
Organization and management 2 Management Function
 
Organization and management 1
Organization and management 1Organization and management 1
Organization and management 1
 
Designing web page marquee and img tag
Designing web page  marquee and img tagDesigning web page  marquee and img tag
Designing web page marquee and img tag
 
Ms excel 2013 formatting worksheets
Ms excel 2013 formatting worksheetsMs excel 2013 formatting worksheets
Ms excel 2013 formatting worksheets
 
Ms excel 2013 data management
Ms excel 2013 data managementMs excel 2013 data management
Ms excel 2013 data management
 
Microsoft Excel introduction
Microsoft Excel introductionMicrosoft Excel introduction
Microsoft Excel introduction
 
Word 2013 working with pictures
Word 2013 working with picturesWord 2013 working with pictures
Word 2013 working with pictures
 
Word 2013 Formatting Page
Word 2013 Formatting PageWord 2013 Formatting Page
Word 2013 Formatting Page
 
Word 2013 8
Word 2013 8Word 2013 8
Word 2013 8
 
Ms word 2013 7
Ms word 2013 7Ms word 2013 7
Ms word 2013 7
 
Ms word 2013 6
Ms word 2013 6Ms word 2013 6
Ms word 2013 6
 
Ms word 2013 4
Ms word 2013 4Ms word 2013 4
Ms word 2013 4
 
Ms word 2013 2
Ms word 2013 2Ms word 2013 2
Ms word 2013 2
 
Ms word 2013
Ms word 2013Ms word 2013
Ms word 2013
 
Parts of the ms word 2013 screen and
Parts of the ms word 2013 screen andParts of the ms word 2013 screen and
Parts of the ms word 2013 screen and
 
Word processor
Word processorWord processor
Word processor
 
Session 2 test construction.mt's
Session 2   test construction.mt'sSession 2   test construction.mt's
Session 2 test construction.mt's
 
Cooking ingredients
Cooking ingredientsCooking ingredients
Cooking ingredients
 
Color theory
Color theoryColor theory
Color theory
 

Dernier

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 

Dernier (20)

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 

Css font properties

  • 1. Unit III: Adding Styles and Interactivity Using CSS and Javascript
  • 2. CSS Font Properties • The CSS Font Properties allow you to specify the font characteristic such as fonts, font size, font style, etc.
  • 3. Property Description Example font-family Specifies the font h1{font-family: family for text arial, verdana, sans- serif;} h2{font-family: garamond, serif;} h3{font-family: Courier, monospace;} font-size Specifies the font size h1{font-size: 25px;} of text h2{font-size: 13pt;} Value: pixel, point or h3{font-size: 115%} percentage font-style Specifies the font style h1{font-style: for text oblique;} Value: h2{font-style: italic normal, oblique, or italic
  • 4. Property Description Example font-variant Specifies whether or h1{font-variant: not a text should be small-caps;} displayed in a small- h1{font-variant: caps font or normal normal;} font font-weight Specifies the weight h1{font-weight: of a font to normal bold;} or bold h1{font-weight: normal;} font Sets all the font h1{font: oblique properties in one bold 20px “Times declaration New Roman”, sans serif;}
  • 5. COMPUQUIZ 1. Write the CSS code to set the font to Broadway. 2. Write the CSS code to set the font size to 16pt. 3. Write the CSS code to set the font style to italic. 4. Write the CSS code to set the font to small caps. 5. Write the CSS code to set the font to bold. 6. Write the CSS code to set 1-5 in one declaration.
  • 6. Answer • 1.body{font-family:broadway;} 2. body{font-size: 16pt;} • 3.body{font-style: italic;} • 4. body{font-variant:small-caps;} • Body{font-weight: bold;} • Body{font : broadway 16pt italic small-caps bold;}