SlideShare una empresa de Scribd logo
1 de 17
Font 
322432 Web Design Technology 
By Yaowaluck Promdee, Sumonta Kasemvilas 
CSS & HTML 
322432-1/2014
Index 
• Unit Style Sheet 
• CSS - Fonts 
• Example 
• Assignment 
322432-1/2014
Unit Style Sheet 
Relative Length 
• em – font size of element 
• ex- height of element’s font 
• percent- consists of a number 
immediately followed by percent 
sign ‘%’ 
322432-1/2014
Unit Style Sheet (Cont.) 
Absolute Length 
• in (inches; 1in=2.54cm =72pt =6pc) 
Ex. 2in, 1.5in 
• cm (centimeters; 1cm=10mm) Ex. 2cm, 1.11cm 
• mm (millimeters) Ex. 50mm, 0.8mm 
• pt (points; 1pt=1/72in, 10pt = 12px) Ex.12pt, 20pt 
• pc (picas; 1pc=12pt) Ex. 1pc, 2pc 
• pixel (px) : pixel 1px is equal to 1/96th of 1in 
322432-1/2014
322432-1/2014 
Example 
h1 { line-height: 1.2em } 
h1 { font-size: 1.2em } 
h1 { margin: 0.5in } /* inches */ 
h2 { line-height: 3cm } /* centimeters */ 
h3 { word-spacing: 4mm } /* millimeters */ 
h4 { font-size: 12pt } /* points */ 
h4 { font-size: 1pc } /* picas */ 
p { font-size: 12px } /* px */
322432-1/2014
CSS-Font 
Property Description Values 
font-family Specifies the font family 
322432-1/2014 
for text 
Ex. Arial, Helvetica, 
sans-serif 
font-size Specifies the font size of 
text 
xx-small, x-small, small, 
medium, large, x-large, 
xx-large, smaller, larger, 
18px, 70%, 150%
CSS-Font 
Property Description Values 
font-style The font-style property is mostly 
used to specify italic text. 
322432-1/2014 
normal 
italic 
oblique 
font-variant In a small-caps font, all 
lowercase letters are converted 
to uppercase letters. 
normal 
Small-Caps 
font-weight The font-weight property sets 
how thick or thin characters in 
text should be displayed. 
normal 
bold 
bolder 
lighter 
100 
200
Example1 
322432-1/2014 
p { 
font-family:Arial; 
font-size:16pt; 
color:green 
} 
p.ex { font:15px sans-serif red; 
/*not specified */ }
Example2 
322432-1/2014 
How you code? 
<p style="font-weight:bold">Love me Love my dog</p> 
<p style="font: normal small-caps bold 16px sans-serif, Arial; 
color:#FF0033">Love me Love my dog</p>
Difference Between Serif and Sans-serif Fonts 
322432-1/2014
Text 
Property Description Values 
color The color property is used to set 
the color of the text 
322432-1/2014 
- a HEX value - like 
"#ff0000" 
- an RGB value - like 
"rgb(255,0,0)" 
- a color name - like "red" 
direction The direction property specifies the 
text direction/writing direction 
direction: ltr|rtl|initial|inherit; 
line-height The line-height property specifies 
the line height. 
line-height: 
normal|number|length|initial| 
inherit; 
letter-spacing The letter-spacing property 
increases or decreases the space 
between characters in a text. 
letter-spacing: 
normal|length|initial|inherit; 
text-align The text-align property specifies the 
horizontal alignment of text in an 
element. 
text-align: 
left|right|center|justify|initial|i 
nherit; 
http://www.w3schools.com/
Text 
Property Description Values 
text-decoration The text-decoration property 
specifies the decoration added to 
text. 
322432-1/2014 
text-decoration: 
none|underline| overline| 
line-through|initial|inherit; 
text-indent The text-indent property specifies 
the indentation of the first line in a 
text-block. 
text-indent: length |initial 
|inherit; 
text-transform The text-transform property 
controls the capitalization of text 
None | capitalize | 
uppercase | lowercase | 
initial | inherit 
white-space The white-space property 
specifies how white-space inside 
an element is handled. 
Normal | nowrap | pre | pre-line 
| pre-wrap | initial | 
inherit 
word-spacing The word-spacing property 
increases or decreases the white 
space between words. 
word-spacing: normal | 
length | initial | inherit 
http://www.w3schools.com/
Example 
<html> 
<head> 
<style type="text/css"> 
.p1 { 
color:#FF0033; 
line-height:18pt; 
letter-spacing:0.05cm; 
text-decoration:overline; 
text-indent:0.5in; 
text-transform:capitalize; 
white-space:normal; 
word-spacing:0.5em; 
} 
</style> 
</head> 
<body> 
<p class="p1">good moring teacher, how are you today?</p> 
</body> 
</html>
Example
Assignment#6 Fonts 
Create a Web page to present “CSS-Font design” 
from information provided using 
CSS font and text 
“CSS-Font design” 
รูปแบบการส่งงาน 
Grade will be based on your CSS technique and look and 
feel of the Web page. 
**กรณีมีรูปภาพหรือกราฟิกอื่นให้ใส่มาใน folder งานด้วย โดยไม่ต้อง zip ไม่งัน้รูปภาพหรือกราฟฟิกจะ 
ไม่แสดง**

Más contenido relacionado

Similar a Lab#6 font css html

Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Larry King
 
Html text and formatting
Html text and formattingHtml text and formatting
Html text and formatting
eShikshak
 

Similar a Lab#6 font css html (20)

CSS Font & Text style
CSS Font & Text style CSS Font & Text style
CSS Font & Text style
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
Web Engineering - Introduction to CSS
Web Engineering - Introduction to CSSWeb Engineering - Introduction to CSS
Web Engineering - Introduction to CSS
 
IT2255 Web Essentials - Unit II Web Designing
IT2255 Web Essentials - Unit II  Web DesigningIT2255 Web Essentials - Unit II  Web Designing
IT2255 Web Essentials - Unit II Web Designing
 
Cascading Style Sheets By Mukesh
Cascading Style Sheets By MukeshCascading Style Sheets By Mukesh
Cascading Style Sheets By Mukesh
 
Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3
 
Css
CssCss
Css
 
Web Programming-css.pptx
Web Programming-css.pptxWeb Programming-css.pptx
Web Programming-css.pptx
 
HTML Text formatting tags
HTML Text formatting tagsHTML Text formatting tags
HTML Text formatting tags
 
Kick start @ css
Kick start @ cssKick start @ css
Kick start @ css
 
CSS3 basics for beginners - Imrokraft
CSS3 basics for beginners - ImrokraftCSS3 basics for beginners - Imrokraft
CSS3 basics for beginners - Imrokraft
 
CSS.pptx
CSS.pptxCSS.pptx
CSS.pptx
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete Notes
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Css
CssCss
Css
 
Css
CssCss
Css
 
css.pdf
css.pdfcss.pdf
css.pdf
 
Cascading style sheets (CSS-Web Technology)
Cascading style sheets (CSS-Web Technology)Cascading style sheets (CSS-Web Technology)
Cascading style sheets (CSS-Web Technology)
 
CascadingStyleSheets in ONESHOT By DeathCodeYT .pdf
CascadingStyleSheets  in ONESHOT By DeathCodeYT .pdfCascadingStyleSheets  in ONESHOT By DeathCodeYT .pdf
CascadingStyleSheets in ONESHOT By DeathCodeYT .pdf
 
Html text and formatting
Html text and formattingHtml text and formatting
Html text and formatting
 

Más de Yaowaluck Promdee

Más de Yaowaluck Promdee (20)

A basic of UX for beginner
A basic of UX for beginnerA basic of UX for beginner
A basic of UX for beginner
 
TCAS 2563
TCAS 2563TCAS 2563
TCAS 2563
 
Portfolio design
Portfolio designPortfolio design
Portfolio design
 
Concept to creation story and storyboard
Concept to creation  story and storyboard Concept to creation  story and storyboard
Concept to creation story and storyboard
 
Observation and interviewing
Observation and interviewingObservation and interviewing
Observation and interviewing
 
Requirement gathering-and-lean-canvas
Requirement gathering-and-lean-canvasRequirement gathering-and-lean-canvas
Requirement gathering-and-lean-canvas
 
Good bad design
Good bad designGood bad design
Good bad design
 
Bootstrap Framework
Bootstrap Framework Bootstrap Framework
Bootstrap Framework
 
Tables and forms with HTML, CSS
Tables and forms with HTML, CSS  Tables and forms with HTML, CSS
Tables and forms with HTML, CSS
 
Navigation and Link
Navigation and LinkNavigation and Link
Navigation and Link
 
Graphic, Color and tools
Graphic, Color and toolsGraphic, Color and tools
Graphic, Color and tools
 
Page layouts flexible and fixed layout with CSS
Page layouts flexible and fixed layout with CSSPage layouts flexible and fixed layout with CSS
Page layouts flexible and fixed layout with CSS
 
CSS Boc model
CSS Boc model CSS Boc model
CSS Boc model
 
Style and Selector Part2
Style and Selector Part2Style and Selector Part2
Style and Selector Part2
 
Style and Selector
Style and SelectorStyle and Selector
Style and Selector
 
Design sitemap
Design sitemapDesign sitemap
Design sitemap
 
Good/Bad Web Design
Good/Bad Web DesignGood/Bad Web Design
Good/Bad Web Design
 
HTML 5
HTML 5HTML 5
HTML 5
 
Overview HTML, HTML5 and Validations
Overview HTML, HTML5 and Validations Overview HTML, HTML5 and Validations
Overview HTML, HTML5 and Validations
 
Web Interface
Web InterfaceWeb Interface
Web Interface
 

Último

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Último (20)

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
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
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
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
 
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
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
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
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
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...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 

Lab#6 font css html

  • 1. Font 322432 Web Design Technology By Yaowaluck Promdee, Sumonta Kasemvilas CSS & HTML 322432-1/2014
  • 2. Index • Unit Style Sheet • CSS - Fonts • Example • Assignment 322432-1/2014
  • 3. Unit Style Sheet Relative Length • em – font size of element • ex- height of element’s font • percent- consists of a number immediately followed by percent sign ‘%’ 322432-1/2014
  • 4. Unit Style Sheet (Cont.) Absolute Length • in (inches; 1in=2.54cm =72pt =6pc) Ex. 2in, 1.5in • cm (centimeters; 1cm=10mm) Ex. 2cm, 1.11cm • mm (millimeters) Ex. 50mm, 0.8mm • pt (points; 1pt=1/72in, 10pt = 12px) Ex.12pt, 20pt • pc (picas; 1pc=12pt) Ex. 1pc, 2pc • pixel (px) : pixel 1px is equal to 1/96th of 1in 322432-1/2014
  • 5. 322432-1/2014 Example h1 { line-height: 1.2em } h1 { font-size: 1.2em } h1 { margin: 0.5in } /* inches */ h2 { line-height: 3cm } /* centimeters */ h3 { word-spacing: 4mm } /* millimeters */ h4 { font-size: 12pt } /* points */ h4 { font-size: 1pc } /* picas */ p { font-size: 12px } /* px */
  • 7. CSS-Font Property Description Values font-family Specifies the font family 322432-1/2014 for text Ex. Arial, Helvetica, sans-serif font-size Specifies the font size of text xx-small, x-small, small, medium, large, x-large, xx-large, smaller, larger, 18px, 70%, 150%
  • 8. CSS-Font Property Description Values font-style The font-style property is mostly used to specify italic text. 322432-1/2014 normal italic oblique font-variant In a small-caps font, all lowercase letters are converted to uppercase letters. normal Small-Caps font-weight The font-weight property sets how thick or thin characters in text should be displayed. normal bold bolder lighter 100 200
  • 9. Example1 322432-1/2014 p { font-family:Arial; font-size:16pt; color:green } p.ex { font:15px sans-serif red; /*not specified */ }
  • 10. Example2 322432-1/2014 How you code? <p style="font-weight:bold">Love me Love my dog</p> <p style="font: normal small-caps bold 16px sans-serif, Arial; color:#FF0033">Love me Love my dog</p>
  • 11. Difference Between Serif and Sans-serif Fonts 322432-1/2014
  • 12. Text Property Description Values color The color property is used to set the color of the text 322432-1/2014 - a HEX value - like "#ff0000" - an RGB value - like "rgb(255,0,0)" - a color name - like "red" direction The direction property specifies the text direction/writing direction direction: ltr|rtl|initial|inherit; line-height The line-height property specifies the line height. line-height: normal|number|length|initial| inherit; letter-spacing The letter-spacing property increases or decreases the space between characters in a text. letter-spacing: normal|length|initial|inherit; text-align The text-align property specifies the horizontal alignment of text in an element. text-align: left|right|center|justify|initial|i nherit; http://www.w3schools.com/
  • 13. Text Property Description Values text-decoration The text-decoration property specifies the decoration added to text. 322432-1/2014 text-decoration: none|underline| overline| line-through|initial|inherit; text-indent The text-indent property specifies the indentation of the first line in a text-block. text-indent: length |initial |inherit; text-transform The text-transform property controls the capitalization of text None | capitalize | uppercase | lowercase | initial | inherit white-space The white-space property specifies how white-space inside an element is handled. Normal | nowrap | pre | pre-line | pre-wrap | initial | inherit word-spacing The word-spacing property increases or decreases the white space between words. word-spacing: normal | length | initial | inherit http://www.w3schools.com/
  • 14. Example <html> <head> <style type="text/css"> .p1 { color:#FF0033; line-height:18pt; letter-spacing:0.05cm; text-decoration:overline; text-indent:0.5in; text-transform:capitalize; white-space:normal; word-spacing:0.5em; } </style> </head> <body> <p class="p1">good moring teacher, how are you today?</p> </body> </html>
  • 15.
  • 17. Assignment#6 Fonts Create a Web page to present “CSS-Font design” from information provided using CSS font and text “CSS-Font design” รูปแบบการส่งงาน Grade will be based on your CSS technique and look and feel of the Web page. **กรณีมีรูปภาพหรือกราฟิกอื่นให้ใส่มาใน folder งานด้วย โดยไม่ต้อง zip ไม่งัน้รูปภาพหรือกราฟฟิกจะ ไม่แสดง**

Notas del editor

  1. h1 { line-height: 1.2em } means that the line height of h1 elements will be 20% greater than the font size of h1 element. On the other hand: h1 { font-size: 1.2em } means that the font size of h1 elements will be 20% greater than the computed font size inherited by h1 elements.
  2. This property has three values: normal - The text is shown normally italic - The text is shown in italics oblique - The text is "leaning" (oblique is very similar to italic, but less supported)
  3. Normal - A normal line height. This is default Number - A number that will be multiplied with the current font size to set the line height Length - A fixed line height in px, pt, cm, etc. % - A line height in percent of the current font size Initial - Sets this property to its default value. Inherit - Inherits this property from its parent element.
  4. จากเนื้อหาที่ให้มา ให้นักศึกษา นำเนื้อหาไปจัดวางออกแบบโดยใช้ CSS Font text ในการจัดรูปแบบการนำเสนอ เนื้อหาที่ยกมาให้