SlideShare ist ein Scribd-Unternehmen logo
1 von 10
WEEK 12 
FONTS: 
SIZE
FONT SIZE 
Absolute size: 
• Sets the text to a specified size 
• Does not allow a user to change the text size in all browsers (bad for 
accessibility reasons) 
• Absolute size is useful when the physical size of the output is known 
Relative size: 
• Sets the size relative to surrounding elements 
• Allows a user to change the text size in browsers
FONT SIZE UNITS: 
RELATIVE VS. ABSOLUTE UNITS 
Unit Shortened Scalable? Description 
“Ems” em • Yes 
• Relative 
• The current font-size is equal to 1em 
Example: 
• If the font-size of the document is 12pt, 
1em is equal to 12pt 
• Ems are scalable in nature, so 2em would 
equal 24pt, .5em would equal 6pt 
Pixels px • No 
• Absolute 
• One pixel is equal to one dot on the 
computer screen 
• Allows for precise design 
• But…pixel units don’t scale upward for 
visually-impaired readers or downward to 
fit mobile devices 
Percent % • Yes 
• Relative 
• The current font-size is equal to 100% 
• Example: 12pt = 100% 
Points Pt • No 
• Absolute 
• Generally used for print media
FONT SIZE 
• Generally, 1em = 12pt = 16px = 100% 
• If you do not specify a font size, the default size for normal text, 
like paragraphs, is 16px (16px=1em) 
• If you changed the body’s font-size attribute, the em and percent 
units get larger, but pixels and points would not 
• Eg. paragraph styles with a pixel size would not get larger – 
this is not a good for accessibility or user experience
SIZE KEYWORDS 
Yet another way to define font size is with keywords: 
• xx-small 
• x-small 
• small 
• medium, 
• large, 
• x-large 
• xx-large 
• as well as relative keywords smaller and larger
WHAT SIZE UNIT SHOULD I USE? 
• The percent unit seems to provide a more consistent and 
accessible display for users 
• When computer settings have changed, percent text scales at 
a reasonable rate, allowing designers to preserve readability, 
accessibility, and visual design 
The winner: percent (%)
HOW DO I WRITE THAT IN CSS? 
body 
{ 
font-size: 100%; 
} 
p 
{ 
font-size: 90%; 
} 
• In this case the page would display fonts at the default size of 
the browser (usually around 16px) and it would display text in 
paragraphs at 90% 
• Remember the cascade part of CSS: things you define can 
take on other measurements in other styles
TRY IT OUT! 
Check the link in week 12 to W3C schools 
and try experimenting with the size of the 
headings and paragraphs
LINE HEIGHT 
• Line height changes the 
space between lines of 
text 
• Too tight or too loose 
makes reading difficult
LINE HEIGHT 
• Ideal line height is comfortable to read:

Weitere ähnliche Inhalte

Ähnlich wie Week 12 CSS Font - size

Web Typography 101
Web Typography 101Web Typography 101
Web Typography 101
breahnag
 
Be your own publisher seminar calif april 2010-session1_c_darkbkgd
Be your own publisher seminar  calif april 2010-session1_c_darkbkgdBe your own publisher seminar  calif april 2010-session1_c_darkbkgd
Be your own publisher seminar calif april 2010-session1_c_darkbkgd
J T "Tom" Johnson
 

Ähnlich wie Week 12 CSS Font - size (20)

Elegant Web Typography
Elegant Web TypographyElegant Web Typography
Elegant Web Typography
 
Fonts
FontsFonts
Fonts
 
Print design vs web design
Print design vs web designPrint design vs web design
Print design vs web design
 
Responsive Web Design
Responsive Web Design Responsive Web Design
Responsive Web Design
 
Best web design company
Best web design companyBest web design company
Best web design company
 
Raster vs vector
Raster vs vectorRaster vs vector
Raster vs vector
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Tdf responsive design101_v1
Tdf responsive design101_v1Tdf responsive design101_v1
Tdf responsive design101_v1
 
Web Typography 101
Web Typography 101Web Typography 101
Web Typography 101
 
The Third Screen: Using HTML+CSS to format for Print
The Third Screen: Using HTML+CSS to format for PrintThe Third Screen: Using HTML+CSS to format for Print
The Third Screen: Using HTML+CSS to format for Print
 
Approaches to CSS Layout
Approaches to CSS LayoutApproaches to CSS Layout
Approaches to CSS Layout
 
Be your own publisher seminar calif april 2010-session1_c_darkbkgd
Be your own publisher seminar  calif april 2010-session1_c_darkbkgdBe your own publisher seminar  calif april 2010-session1_c_darkbkgd
Be your own publisher seminar calif april 2010-session1_c_darkbkgd
 
Habits of Effective Designers
Habits of Effective DesignersHabits of Effective Designers
Habits of Effective Designers
 
The future of typography in Web design
The future of typography in Web designThe future of typography in Web design
The future of typography in Web design
 
8 Typography Notes
8 Typography Notes8 Typography Notes
8 Typography Notes
 
Midterm review
Midterm reviewMidterm review
Midterm review
 
Powerpoint Training - Ten golden rules for making effective Presentations
Powerpoint Training - Ten golden rules for making effective PresentationsPowerpoint Training - Ten golden rules for making effective Presentations
Powerpoint Training - Ten golden rules for making effective Presentations
 
9781111528705_PPT_ch05.ppt
9781111528705_PPT_ch05.ppt9781111528705_PPT_ch05.ppt
9781111528705_PPT_ch05.ppt
 
Making Your Site Printable: Booster Conference
Making Your Site Printable: Booster ConferenceMaking Your Site Printable: Booster Conference
Making Your Site Printable: Booster Conference
 
Ppt ch05
Ppt ch05Ppt ch05
Ppt ch05
 

Mehr von Katherine McCurdy-Lapierre, R.G.D.

Mehr von Katherine McCurdy-Lapierre, R.G.D. (18)

Module 5 - WCM system comparison
Module 5 - WCM system comparison Module 5 - WCM system comparison
Module 5 - WCM system comparison
 
Module 4 - Dreamweaver Templates (Static vs. Dynamic Content)
Module 4 - Dreamweaver Templates (Static vs. Dynamic Content)Module 4 - Dreamweaver Templates (Static vs. Dynamic Content)
Module 4 - Dreamweaver Templates (Static vs. Dynamic Content)
 
Module 3 - Intro to Bootstrap
Module 3 - Intro to BootstrapModule 3 - Intro to Bootstrap
Module 3 - Intro to Bootstrap
 
Week 4 - tablet app design
Week 4 - tablet app designWeek 4 - tablet app design
Week 4 - tablet app design
 
Week 3 Lecture: Accessibility
Week 3 Lecture: AccessibilityWeek 3 Lecture: Accessibility
Week 3 Lecture: Accessibility
 
Interactive Web Design 5 - Week 2 - Introduction
Interactive Web Design 5 - Week 2 -  IntroductionInteractive Web Design 5 - Week 2 -  Introduction
Interactive Web Design 5 - Week 2 - Introduction
 
Week 12 CSS - Review from last week
Week 12 CSS - Review from last weekWeek 12 CSS - Review from last week
Week 12 CSS - Review from last week
 
Week11 Lecture: CSS
Week11 Lecture: CSSWeek11 Lecture: CSS
Week11 Lecture: CSS
 
Week 6 Lecture
Week 6 LectureWeek 6 Lecture
Week 6 Lecture
 
Week 5 Lecture
Week 5 LectureWeek 5 Lecture
Week 5 Lecture
 
Week 4 Lecture Accessibility
Week 4 Lecture AccessibilityWeek 4 Lecture Accessibility
Week 4 Lecture Accessibility
 
Week 4 Lecture Part 1
Week 4 Lecture Part 1Week 4 Lecture Part 1
Week 4 Lecture Part 1
 
Week 4 Lecture Part 2
Week 4 Lecture Part 2Week 4 Lecture Part 2
Week 4 Lecture Part 2
 
Artistic Web Applications - Week3 - Part 1
Artistic Web Applications - Week3 - Part 1Artistic Web Applications - Week3 - Part 1
Artistic Web Applications - Week3 - Part 1
 
Artistic Web Applications - Week3 - Part 3
Artistic Web Applications - Week3 - Part 3Artistic Web Applications - Week3 - Part 3
Artistic Web Applications - Week3 - Part 3
 
Artistic Web Applications - Week3 - Part 2
Artistic Web Applications - Week3 - Part 2Artistic Web Applications - Week3 - Part 2
Artistic Web Applications - Week3 - Part 2
 
Week2 lecture-whatiswebdesign-part1
Week2 lecture-whatiswebdesign-part1Week2 lecture-whatiswebdesign-part1
Week2 lecture-whatiswebdesign-part1
 
LecWeek2 lecture-whatiswebdesign-part2
LecWeek2 lecture-whatiswebdesign-part2LecWeek2 lecture-whatiswebdesign-part2
LecWeek2 lecture-whatiswebdesign-part2
 

Kürzlich hochgeladen

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Kürzlich hochgeladen (20)

2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 

Week 12 CSS Font - size

  • 2. FONT SIZE Absolute size: • Sets the text to a specified size • Does not allow a user to change the text size in all browsers (bad for accessibility reasons) • Absolute size is useful when the physical size of the output is known Relative size: • Sets the size relative to surrounding elements • Allows a user to change the text size in browsers
  • 3. FONT SIZE UNITS: RELATIVE VS. ABSOLUTE UNITS Unit Shortened Scalable? Description “Ems” em • Yes • Relative • The current font-size is equal to 1em Example: • If the font-size of the document is 12pt, 1em is equal to 12pt • Ems are scalable in nature, so 2em would equal 24pt, .5em would equal 6pt Pixels px • No • Absolute • One pixel is equal to one dot on the computer screen • Allows for precise design • But…pixel units don’t scale upward for visually-impaired readers or downward to fit mobile devices Percent % • Yes • Relative • The current font-size is equal to 100% • Example: 12pt = 100% Points Pt • No • Absolute • Generally used for print media
  • 4. FONT SIZE • Generally, 1em = 12pt = 16px = 100% • If you do not specify a font size, the default size for normal text, like paragraphs, is 16px (16px=1em) • If you changed the body’s font-size attribute, the em and percent units get larger, but pixels and points would not • Eg. paragraph styles with a pixel size would not get larger – this is not a good for accessibility or user experience
  • 5. SIZE KEYWORDS Yet another way to define font size is with keywords: • xx-small • x-small • small • medium, • large, • x-large • xx-large • as well as relative keywords smaller and larger
  • 6. WHAT SIZE UNIT SHOULD I USE? • The percent unit seems to provide a more consistent and accessible display for users • When computer settings have changed, percent text scales at a reasonable rate, allowing designers to preserve readability, accessibility, and visual design The winner: percent (%)
  • 7. HOW DO I WRITE THAT IN CSS? body { font-size: 100%; } p { font-size: 90%; } • In this case the page would display fonts at the default size of the browser (usually around 16px) and it would display text in paragraphs at 90% • Remember the cascade part of CSS: things you define can take on other measurements in other styles
  • 8. TRY IT OUT! Check the link in week 12 to W3C schools and try experimenting with the size of the headings and paragraphs
  • 9. LINE HEIGHT • Line height changes the space between lines of text • Too tight or too loose makes reading difficult
  • 10. LINE HEIGHT • Ideal line height is comfortable to read: