Professional Documents
Culture Documents
DBAV
Web UI/UX
Week 02.
SOFTWARE CLUSTER
[ CDEV • Coding and Development Project] [ DBAV • Database Applicati on Development ]
Objectives
4
Types of Fonts
System Fonts
• Pre-installed fonts found in many Operating Systems.
• Use by browsers by default.
Web Fonts
• Non-system fonts that can be downloaded from the
web.
TEMASEK POLYTECHNIC I School of Informati cs & IT 5
System Fonts
Comic
Times Arial Courier
Sans
Geneva
h1 {
font-family: Arial, Helvetica, Verdana, sans-serif;
}
Font name.
@font-face {
font-family: ’DeliciousRoman’;
src: url(’http://www.fontface.com/fonts/delicious/Delicious-Roman.otf’);
font-weight: 400;
}
Font path/URL.
h1 {
font-family: DeliciousRoman, Helvetica, Verdana, sans-serif;
}
Serif Times New Roman Serif fonts have small lines at the ends on some
Georgia characters
Sans-serif Arial "Sans" means without - these fonts do not have the
Verdana lines at the ends of characters
Monospace Courier New All monospace characters have the same width
Lucida Console
Source Output
Source Output
Source Output
15
TEMASEK POLYTECHNIC I School of Informati cs & IT
Fixed Units vs. Relative Units
• Fixed units are displayed at the requested size, regardless of device or context.
• E.g. px
• Relative units are displayed relative to the environment in which they are found.
• E.g. em
Source Output
17
TEMASEK POLYTECHNIC I School of Informati cs & IT
Font-Variant
Source Output
18
TEMASEK POLYTECHNIC I School of Informati cs & IT
Text Formatting
• To learn more about CSS font and text formatting, check out the link
below:
• http://www.w3schools.com/css/css_text.asp
20
The Box Model
Source Output
23
TEMASEK POLYTECHNIC I School of Informati cs & IT
Margins: Inherit
Source Output
Source Output
25
TEMASEK POLYTECHNIC I School of Informati cs & IT
Padding
Source Output
Source Output
30
Content Regions