SlideShare a Scribd company logo
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>
Lab#6 font css 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 ไม่งัน้รูปภาพหรือกราฟฟิกจะ 
ไม่แสดง**

More Related Content

PPTX
Etiquetas html
PPTX
Tablas (etiquetas en HTML)
PPTX
Hojas de estilo en cascada
PPTX
Programacion html
PDF
ShelbysPortfolio
PPTX
Tablas y etiquetas para HTML
PPTX
Etiquetas html
DOCX
Etiquetas html
Etiquetas html
Tablas (etiquetas en HTML)
Hojas de estilo en cascada
Programacion html
ShelbysPortfolio
Tablas y etiquetas para HTML
Etiquetas html
Etiquetas html

Similar to Lab#6 font css html (20)

PDF
PDF
CSS Font & Text style
PDF
Introduction to CSS
PPTX
Web Engineering - Introduction to CSS
PPTX
Css Complete Notes
DOC
Css 1
 
PPT
Introduction to CSS Fonts, Texts and Colors - Lesson 7
PPTX
CSS ppt of cascading Style sheet for beginners.pptx
PDF
Styling Text With CSS
PPTX
Chapter 12: CSS Part 2
PPTX
Getting started with css
PPTX
2_css.pptx
PPTX
2_css.pptx
PPTX
Unitegergergegegegetgegegegegegeg-2-CSS.pptx
PPTX
CSS - Cascading Style Sheets
PDF
DOCX
PDF
Pemrograman Web 3 - CSS Basic Part 2
PPTX
Css font properties
PPTX
CSS Font & Text style
Introduction to CSS
Web Engineering - Introduction to CSS
Css Complete Notes
Css 1
 
Introduction to CSS Fonts, Texts and Colors - Lesson 7
CSS ppt of cascading Style sheet for beginners.pptx
Styling Text With CSS
Chapter 12: CSS Part 2
Getting started with css
2_css.pptx
2_css.pptx
Unitegergergegegegetgegegegegegeg-2-CSS.pptx
CSS - Cascading Style Sheets
Pemrograman Web 3 - CSS Basic Part 2
Css font properties
Ad

More from Yaowaluck Promdee (20)

PDF
A basic of UX for beginner
PDF
PDF
Portfolio design
PDF
Concept to creation story and storyboard
PPTX
Observation and interviewing
PPTX
Requirement gathering-and-lean-canvas
PDF
Good bad design
PPTX
Bootstrap Framework
PDF
Tables and forms with HTML, CSS
PDF
Navigation and Link
PDF
Graphic, Color and tools
PPTX
Page layouts flexible and fixed layout with CSS
PDF
CSS Boc model
PDF
Style and Selector Part2
PDF
Style and Selector
PPTX
Design sitemap
PPTX
Good/Bad Web Design
PPTX
Overview HTML, HTML5 and Validations
PPTX
Web Interface
A basic of UX for beginner
Portfolio design
Concept to creation story and storyboard
Observation and interviewing
Requirement gathering-and-lean-canvas
Good bad design
Bootstrap Framework
Tables and forms with HTML, CSS
Navigation and Link
Graphic, Color and tools
Page layouts flexible and fixed layout with CSS
CSS Boc model
Style and Selector Part2
Style and Selector
Design sitemap
Good/Bad Web Design
Overview HTML, HTML5 and Validations
Web Interface
Ad

Recently uploaded (20)

PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
COMPUTERS AS DATA ANALYSIS IN PRECLINICAL DEVELOPMENT.pptx
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Business Ethics Teaching Materials for college
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPH.pptx obstetrics and gynecology in nursing
Week 4 Term 3 Study Techniques revisited.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
COMPUTERS AS DATA ANALYSIS IN PRECLINICAL DEVELOPMENT.pptx
102 student loan defaulters named and shamed – Is someone you know on the list?
Microbial disease of the cardiovascular and lymphatic systems
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Business Ethics Teaching Materials for college
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Renaissance Architecture: A Journey from Faith to Humanism
2.FourierTransform-ShortQuestionswithAnswers.pdf
Pharma ospi slides which help in ospi learning
TR - Agricultural Crops Production NC III.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx

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>
  • 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 ไม่งัน้รูปภาพหรือกราฟฟิกจะ ไม่แสดง**

Editor's Notes

  • #6: 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.
  • #9: 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)
  • #13: 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.
  • #18: จากเนื้อหาที่ให้มา ให้นักศึกษา นำเนื้อหาไปจัดวางออกแบบโดยใช้ CSS Font text ในการจัดรูปแบบการนำเสนอ เนื้อหาที่ยกมาให้