Typographic web design
How to think like a typographer in HTML and CSS.
Syntax Samples
Since the book has a two-column layout, following multiple lines of complex syntax can get confusing. Where should you include a space? Where will including a space break the syntax?
The two longest bits of syntax are provided below for your copy/paste convenience.
DocType Declaration
To start an HTML document, copy and paste the syntax below into your HTML page. Note: the Doctype declaration provided is from the W3C Quality Assurance Recommended list of Doctype declarations page. I’ve made small changes to the title and body content.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Title of the document</title>
<meta http-equiv="content-type"
content="text/html;charset=utf-8" />
</head>
<body>
</body>
</html>
@font-face
When linking to web fonts using the @font-face declaration, I find it’s easiest to use the syntax provided in the @font-face kits from FontSquirrel.com.
Below is the syntax I use to link to Chopin Script in Lesson 4. I always put my fonts in a “fonts” folder, so I add a “fonts/” to the source URL.
@font-face{
font-family:'ChopinScriptRegular';
src:url('fonts/ChopinScript-webfont.eot');
src:url('fonts/ChopinScript-webfont.eot?#iefix') format('embedded-opentype'),
url('fonts/ChopinScript-webfont.woff') format('woff'),
url('fonts/ChopinScript-webfont.ttf') format('truetype'),
url('fonts/ChopinScript-webfont.svg#ChopinScriptRegular') format('svg');
font-weight:normal;
font-style:normal;
}
Recommended Resources
Writing Syntax
Look up CSS syntax
HTML Dog >>
Special characters and punctuation codes
Character Entity Reference >>
View and test css syntax
FireFox Web Developer >>
Navigation list syntax
Listamatic >>
Download a free text editor
TextWrangler (mac) >>
Notepad++ (pc) >>
Web Fonts
Pick a good web font for text
Good Web Fonts >>
Download a free web font
Font Squirrel >>
Link to free web fonts
Google Web Fonts >>
Link to commercial fonts
typekit.com >>
fontdeck.com >>
Purchase web font licenses
fontspring.com >>
Color
Find a color code
Hues Hub >>
Analyze the colors in an image
What’s It’s Color >>
Build a color scheme
Color
Scheme Designer >>
Typography
Keep up-to-date on web typography
Nice Web Type >>
A List Apart >>
Learn more about typography
typophile.com >>
ilovetypography.com >>