Docsity

CSS Typography: Enhancing Web Page Text with Dr. Marlow J. Marchant's Guidance - Prof. Mar, Study notes of Engineering

Partial preview of the text

Download CSS Typography: Enhancing Web Page Text with Dr. Marlow J. Marchant's Guidance - Prof. Mar and more Study notes Engineering in PDF only on Docsity!

Marlow J. Marchant, Ph.D. Technology Department Copyright 2008 Eastern Kentucky University

CSS Typography

TEC 255

Web Publishing

Readability

Make sure there is good contrast between text and the background. Black text on a white background is best. If using a black background with white text, make the text larger and bold. A text line should not go across the entire browser window. Serif versus San Serif

Typography

CSS has immensely improved typography on a Web page. Type can be specified with a class selector. e selector is created in the style sheet and then declared in the body of a web page as oen as needed. Class selectors can have any name, but must start with a period. .subhead {font-size:1.1em; font-weight:bold;}

University

We will use name selectors, like h1. Common Properties: font-family, font-size, font-weight, line-height, color, background-color, text-align, font-style, and font-variant.

Other CSS Properties

word-spacing and letter-spacing, Changes the amount of space between words and letters. text-indent white-space Displays multiple spaces and returns, also can “nowrap”. text-transform Forces text to be uppercase or lowercase. text-decoration Text underline, overline, line-through and blink Do not use blink.

Font Size

Font Size h1 {font-size:1.5em;} Recommended units are em or %, they are relative. Also, pixels, points, cm, mm, picas, or keywords can be used. Keywords: xx-small, x-small, small, medium, large, x-large, or xx-large.

Font Weight

Font weight changes the width of the characters stroke and is used to show contrast. h2 {font-weight:bold;} For values use: normal, bold, bolder or lighter.

Color

Color, changes the the color of the text. With a light page background, small type should be black.

Background Color

Background color will change the color of the background just behind the text. h1 {color:#5E213B; background-color: aqua; line-height: 1.75em;} It looks like a bar extending to the right of the window, line height will control the height of the bar. Example: Marchant Home Page

Font Style

Font style creates italic type, can be used in-line. .emph {font-style:italic;} Values are: normal, italic or oblique. To use, place this rule in the external style sheet or in the head of the page. Use as a span class selector EKU is a great University. EKU is a great University.

Font Variant

Font variant is used to create SMALL CAPS. Values are normal or small-caps. .scaps {font-variant:small-caps;} EASTERN KENTUCKY UNIVERSITY