Chapter 6 Web Typography. 2 Principles of Web Design Chapter 5 Objectives Understand principles for type design on a Web site Use the element Understand.

Slides:



Advertisements
Similar presentations
Cascading Style Sheets (CSS). Cascading Style Sheets With the explosive growth of the World Wide Web, designers and programmers quickly explored and reached.
Advertisements

CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Cascading Style Sheets
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
XP Introducing Cascading Style Sheets With Cascading Style Sheets (CSS), you can create one or more documents that control the appearance of some or all.
Chapter 6 Web Typography
Week 7 Web Typography. 2 Understanding Type Design Principles.
INTRODUCTORY Tutorial 3 Using CSS to Format Multiple Pages.
Introduction to Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 4.
Text Properties, Line Box, CSS. Text Properties Properties related to the display of text. Text-align : left, right, center I like FSU!
Cascading Style Sheets SP.772 May 6, CSS Useful for creating one unified look for an entire web site. Helps to seperate style from content. Can.
Beginning Web Site Creation: Dreamweaver CS4. XHTMLCSS  Describes the structure  Content  Collection of styles  Formatting body { background-color:
Using Cascading Style Sheets CSS Basics. Goals Understand basic syntax of Cascading Style Sheets (CSS) Understand basic syntax of Cascading Style Sheets.
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
Using Cascading Style Sheets CSS Structure. Goals Understand how contextual, class and ID selectors work Understand how contextual, class and ID selectors.
Creating the Pages Part Four Typography. Type Design Principles Choose fewer fonts and sizes Choose fewer fonts and sizes Choose available fonts Choose.
4.01 Cascading Style Sheets
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Selectors thru Borders. CSS – Cascading Style Sheets – is a way to style HTML HTML is the content base of a web page CSS provides the presentation qualities.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
Using Cascading Style Sheets. Introduction to Styles and Properties  Cascading Style Sheets (CSS) are a standard set by the World Wide Web Consortium.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 7 Web Typography Principles of Web Design, 4 th Edition.
Principles of Web Design 6 th Edition Chapter 5 – Web Typography.
Principles of Web Design 6 th Edition Chapter 10 – Data Tables.
The Characteristics of CSS
CSS Cascading Style Sheets By Garrett Garman. CSS Why use Style Sheets? Separates Appearance and Structure Modularity Quick and Easy changes Flexibility.
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
WORKING WITH CASCADING
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
INTRODUCTION TO HTML5 Styling Text. Change the Font Size  You can use the font-size property to change the font size for a document’s text.  Instead.
Chapter 12 Cascading Style Sheets: Part II The Web Warrior Guide to Web Design Technologies.
1 What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles are normally stored in Style Sheets  Styles.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
 A style sheet is a single page of formatting instructions that can control the appearance of many HTML pages at once.  If style sheets accomplished.
Cascading Style Sheets Orientation Learning Web Design: Chapter 11.
Cascading Style Sheets Chapter Four. What are they? A set of style rules that tell the web browser how to present a web page or document. Cascading Style.
CO1552 – Web Application Development Cascading Style Sheets.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
Stylin’ with CSS Monday October 8 th and Tuesday October 9 th.
CSS Cascading Style Sheets. CSS Advantages Greater typography and page layout control Style is separate from structure Styles can be stored in a separate.
Chapter 6 Introducing Cascading Style Sheets Principles of Web Design, 4 th Edition.
Cascading Style Sheets Robin Burke ECT 270. Outline Midterm The Layout Debate CSS properties Fonts Alignment Color CSS selection selectors pseudo-classes.
INTRODUCTORY Tutorial 3 Using CSS to Format Multiple Pages.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
Lesson 15: Cascading Style Sheets. Objectives Identify ways to apply Web page formatting with Cascading Style Sheets (CSS1 and CSS2) using various methods.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
Introduction to CSS. Why CSS? CSS Provides Efficiency in Design and Updates CSS relatively easy to use Can give you more flexibility and control Faster.
XHTML Formatting font with a style declaration. Formatting Font HTML uses the font tag to change size and family of font But… the font tag is being deprecated.
CSS Hadas Kahsay. Overview  What is CSS  Basic syntax of CSS Rules  How to link CSS style to html documents  Browsers and CSS  Advantages of CSS.
CSS Cascading Style Sheets *referenced from
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
Basic Webpage Design Cascading Style Sheet (CSS).
Chapter 6 Introducing Cascading Style Sheets Principles of Web Design, Third Edition.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
HTML & CSS Contents: the different ways we can use to apply CSS to The HTML documents CSS Colors and Background CSS Fonts CSS Text CSS box model: padding,
Cascading Style Sheets Using HTML. What are they? A set of style rules that tell the web browser how to present a web page or document. In earlier versions.
CSS Introductions. Objectives To take control of the appearance of a Web site by creating style sheets. To use a style sheet to give all the pages of.
CONFIGURING COLOR AND TEXT WITH CSS Chapter 3. Cascading Style Sheets (CSS) Used to configure text, color, and page layout. Launched in 1996 Developed.
Madam Hazwani binti Rahmat
Chapter 7 Web Typography
Chapter 6 Introducing Cascading Style Sheets
Presentation transcript:

Chapter 6 Web Typography

2 Principles of Web Design Chapter 5 Objectives Understand principles for type design on a Web site Use the element Understand why you should use Cascading Style Sheets (CSS) instead of the element Create style rules using CSS style rules Selectively apply CSS style rules

3 Principles of Web Design Chapter 5 Objectives Specify CSS font properties and block-level space values Build and apply style classes

4 Principles of Web Design Chapter 5 Type Design Principles Choose fewer fonts and sizes Choose available fonts Design for legibility Avoid using text as graphics

5 Principles of Web Design Chapter 6

6 Principles of Web Design Chapter 6

7 Principles of Web Design Chapter 6

8 Principles of Web Design Chapter 6

9 Principles of Web Design Chapter 6

10 Principles of Web Design Chapter 6

11 Principles of Web Design Chapter 5 Using the Element Use to set font size and color and to specify font substitution With HTML 4.0, the tag has been deprecated in favor of CSS. To ensure forward compatibility, you should strongly consider moving to CSS, and limit or replace the element in your code

12 Principles of Web Design Chapter 6

13 Principles of Web Design Chapter 5 Using Cascading Style Sheets Cascading style sheets offer much greater control over type characteristics than does the element You can use standard type conventions, such as using point or pixel sizes, setting leading, and specifying indents and alignment

14 Principles of Web Design Chapter 5 Using Cascading Style Sheets Style rules are composed of two parts: a selector and a declaration The selector determines the element to which the rule is applied The declaration details the exact property values

15 Principles of Web Design Chapter 6

16 Principles of Web Design Chapter 5 Using Cascading Style Sheets The declaration contains a property and a value The property is a quality or characteristic The precise specification of the property is contained in the value CSS includes over 50 different properties, each with a specific number of values

17 Principles of Web Design Chapter 6

18 Principles of Web Design Chapter 5 CSS Selection Techniques Selecting single elements Selecting multiple elements Selecting by context Selecting with the CLASS attribute

19 Principles of Web Design Chapter 5 Selecting Single Elements The following rule selects the H1 element: H1 {COLOR: GREEN}

20 Principles of Web Design Chapter 5 Selecting Multiple Elements The following rule selects the H1 and H2 elements: H1, H2 {COLOR: GREEN}

21 Principles of Web Design Chapter 5 Selecting by Context A context-based selector lets you specify the exact context in which a style is applied. To specify that elements appear blue only within elements, use the following rule: H1 I {COLOR: BLUE}

22 Principles of Web Design Chapter 5 Selecting with CLASS The CLASS attribute lets you write rules and then apply them to groups of elements that you have classified. To create a class, declare it within the element first. The period (.) flag character indicates that the selector is a class selector.

23 Principles of Web Design Chapter 6

24 Principles of Web Design Chapter 5 Working with The element lets you specify logical divisions within a document that have their own name and style properties. is a block-level element. It contains a leading and trailing carriage return. You can use with the CLASS attribute to create customized block-level elements.

25 Principles of Web Design Chapter 5 Working with To create a division, declare it within the element first. The following example specifies a division named INTRO as the selector for the rule: DIV.INTRO {COLOR:RED}

26 Principles of Web Design Chapter 5 Working with Next, specify the element in the document. Then use the CLASS attribute to specify the exact type of division. In the following example, the code defines the element as the special class named “INTRO.” Some text

27 Principles of Web Design Chapter 5 Working with The element lets you specify inline elements within a document that have their own name and style properties Inline elements go within the line of text, like the element

28 Principles of Web Design Chapter 5 Working with To create a division, declare it within the element first. The following example specifies a span named LOGO the selector for the rule: SPAN.LOGO {COLOR:RED}

29 Principles of Web Design Chapter 5 Working with Next, specify the element in the document. Then use the CLASS attribute to specify the exact type of span. In the following example, the code defines the element as the special class named “LOGO.” Welcome to the Wonder Software Web site.

30 Principles of Web Design Chapter 5 CSS Font Properties Font families and alternates Font size Font weight Line height Letter spacing Text indent Color

31 Principles of Web Design Chapter 5 CSS Measurement Values CSS offers a variety of measurement units, almost to the point of offering too many choices. For example, to specify font size, you can use any of the measurement units listed in the following table.

32 Principles of Web Design Chapter 6

33 Principles of Web Design Chapter 5 Specifying Font Size The following rule sets the element to 18-point Arial: BLOCKQUOTE {FONT-FAMILY: ARIAL; FONT-SIZE: 18pt}

34 Principles of Web Design Chapter 6

35 Principles of Web Design Chapter 5 Specifying Font Weight The following rule shows the addition of the Font-weight property to the rule: BLOCKQUOTE {FONT-FAMILY: ARIAL; FONT-SIZE: 18pt; FONT-WEIGHT: BOLD}

36 Principles of Web Design Chapter 6

37 Principles of Web Design Chapter 5 Specifying Line Height CSS allows you to specify either a percentage or absolute value for the line height, which is more commonly called leading. The following rule sets the line height to 30 points: BLOCKQUOTE {FONT-FAMILY: ARIAL; FONT-SIZE: 18pt; FONT-WEIGHT: BOLD; LINE-HEIGHT: 30pt}

38 Principles of Web Design Chapter 6

39 Principles of Web Design Chapter 5 Specifying Letter Spacing To adjust kerning, the printer’s term for adjusting the white space between letters, use the Letter-spacing property. The following rule sets the letter-spacing to 2 points: BLOCKQUOTE {FONT-FAMILY: ARIAL FONT-SIZE: 18pt; FONT-WEIGHT: BOLD; LINE-HEIGHT: 30pt; LETTER-SPACING: 2pt}

40 Principles of Web Design Chapter 6

41 Principles of Web Design Chapter 5 Specifying Text Indent Use the Text-indent property to set the amount of indentation for the first line of text in an element, such as a paragraph. The following rule sets an indent of 24 points: BLOCKQUOTE {FONT-FAMILY: ARIAL FONT-SIZE: 18pt; FONT-WEIGHT: BOLD; LINE-HEIGHT: 30pt; LETTER-SPACING: 2pt; TEXT- INDENT: 24pt}

42 Principles of Web Design Chapter 6

43 Principles of Web Design Chapter 5 Specifying Background Colors You can set the background color—the color behind the text—for any element. Use the following syntax: H2 {COLOR: WHITE; BACKGROUND- COLOR: BLUE}

44 Principles of Web Design Chapter 6

45 Principles of Web Design Chapter 5 Specifying Block-Level Spacing Cascading Style Sheets allow you to specify property values for the space around block-level elements. There are three properties you can set: Padding: The area between the text and border Border: The border separates the padding and margin Margin: The area outside the border

46 Principles of Web Design Chapter 6

47 Principles of Web Design Chapter 5 Styling with CSS In this section you’ll see how to set up a style sheet for a document using a variety of font properties. Let’s say that your job is to develop an online library of public-domain texts. You would want to set up a style sheet that you could apply to all the documents in the collection.

48 Principles of Web Design Chapter 5 Styling with CSS In this example, the content is the first chapter from Mark Twain’s A Connecticut Yankee in King Arthur’s Court. Figure 6-17 shows the page marked up with standard HTML.

49 Principles of Web Design Chapter 6

50 Principles of Web Design Chapter 5 Setting up Document Divisions To set up a style sheet, start by determining the logical divisions for the document. Each division will have its own unique type characteristics that can be stated as style rules. Figure 6-18 shows the document divisions you could use for this type of document.

51 Principles of Web Design Chapter 6

52 Principles of Web Design Chapter 5 Standard Paragraph Style P { FONT-FAMILY: ARIAL, HELVETICA, SANS-SERIF; FONT-SIZE: 10pt; LINE-HEIGHT: 20pt; MARGIN-LEFT: 20px; MARGIN-RIGHT: 20px}

53 Principles of Web Design Chapter 6

54 Principles of Web Design Chapter 5 Chapter Number Style.CHAPNUMBER { FONT-SIZE: 24pt; LINE-HEIGHT: 36pt; FONT-WEIGHT: BOLD MARGIN-LEFT: 20px; BACKGROUND-COLOR: GRAY; COLOR: WHITE}

55 Principles of Web Design Chapter 6

56 Principles of Web Design Chapter 5 Chapter Title Style.CHAPTITLE { FONT-SIZE: 18pt; LINE-HEIGHT: 30pt; FONT-WEIGHT: BOLD; LETTER-SPACING: 2pt MARGIN-LEFT: 20px}

57 Principles of Web Design Chapter 6

58 Principles of Web Design Chapter 5 Credit Style DIV.CREDIT { TEXT-ALIGN: RIGHT; FONT-SIZE: 10pt; BORDER-BOTTOM: SOLID 1px BLACK; LINE-HEIGHT: 20pt; MARGIN-LEFT: 20px}

59 Principles of Web Design Chapter 6

60 Principles of Web Design Chapter 6 Summary Use text to communicate information structure. Be sparing with your type choices, and use fonts consistently. Remember that HTML text downloads faster than graphics-based text. Use HTML text whenever possible. Use browser-safe fonts that will display as consistently as possible across operating systems.

61 Principles of Web Design Chapter 6 Summary Limit use of the element because it is deprecated in HTML 4.0. Experiment with Cascading Style Sheets (CSS) and consider implementing them. Once you experience the results of this easy- to-use language, you’ll have a hard time going back to relying on the element.

62 Principles of Web Design Chapter 6 Summary If you use CSS, standardize your styles by building external style sheets and linking multiple documents to them. Test your work! Different browsers and computing platforms render text in different sizes.