Session 3.2.. Objectives Setting the font family Setting the font size Working with Web fonts Setting font faces and sizes Setting font and text appearances.

Slides:



Advertisements
Similar presentations
Part 3 Introduction to CSS. CSS Text Text Styles h1 {color: green} // rgb(0,255,0), #00ff00 h2{letter-spacing: 0.5cm} // 2px h3 {text-align: right} //
Advertisements

Cascading Style Sheets (Formatting. Slide 2 Lecture Overview At this point, you have learned how and where to create styles You have not learned much.
CASCADING STYLE SHEETS CSS. 2 What CSS means?  CSS is an extension to basic HTML that allows you to style your web pages.  It separates the part that.
Week 7 Web Typography. 2 Understanding Type Design Principles.
Text Properties, Line Box, CSS. Text Properties Properties related to the display of text. Text-align : left, right, center I like FSU!
Technologies for web publishing Ing. Václav Freylich Lecture 6.
Multimedia and the World Wide Web HCI 201 Lecture Notes #7B.
Using Cascading Style Sheets CSS Structure. Goals Understand how contextual, class and ID selectors work Understand how contextual, class and ID selectors.
Working with Fonts, Colors, and Graphics HTML: Tutorial 3.
3.1 Cascading Style Sheets. Motto Fashions fade, style is eternal. —Yves Saint Laurent.
+ Text & Font Styles Unit 3 Lesson Different Font Categories Sans Serif – block style fonts Example - Rockwell Easy to read and good to use when.
CSS The Definitive Guide Chapter 6.  Text is the content, and fonts are used to display that content. By using text properties you can affect the position.
Formatting Text (Plus More Selectors) Learning Web Design: Chapter 12.
CSS1-1 Cascading Style Sheets (CSS) Xingquan (Hill) Zhu
Using Cascading Style Sheets. Introduction to Styles and Properties  Cascading Style Sheets (CSS) are a standard set by the World Wide Web Consortium.
Chapter 7 Web Typography Principles of Web Design, 4 th Edition.
Principles of Web Design 6 th Edition Chapter 5 – Web Typography.
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
Cascading Style Sheets, pt 2 ECA 225 Applied Online Programming.
Cascading Style Sheets CSS. CSS - Structure Declaration block Property: identifies what to change Value: how to change it Selector – example h1{ font-size:
WORKING WITH CASCADING
New Perspectives on XML, 2nd Edition Tutorial 5 1 TUTORIAL 5 WORKING WITH CASCADING STYLE SHEETS.
XP New Perspectives on XML Tutorial 5 1 TUTORIAL 5 CSS Tutorial – Carey ISBN
Typography.  Introduction to Typography  Font Collections ▪ Serif ▪ They have small strokes at the end of the character strokes ▪ Ex: Times New Roman,
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.
CSS: Cascading Style Sheets. 2 What are Style Sheets A style sheet is a mechanism that allows to specify how HTML (/XHTML/XML) pages should look The style.
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.
Class three: CSS review, backgrounds, font formatting, the box model.
Tutorial 5 Formatting with CSS. Objectives Session 5.1 – Evaluate why CSS styles are used – Determine where to write styles – Create an element selector.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
Text and Fonts in CSS. Customizing fonts In CSS, fonts are divided into “font families” Only certain fonts are commonly installed on most computers Therefore.
Files you will need ... Black Goose Bistro Summer Menu
Fonts The following CSS properties will be described: 1.Font-family 2.Font-style 3.Font-variant 4.Font-weight 5.Font-size 6.Font.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts.
Cascading Style Sheets Robin Burke ECT 270. Outline Midterm The Layout Debate CSS properties Fonts Alignment Color CSS selection selectors pseudo-classes.
Cascading Style Sheets Eugenia Fernandez IUPUI. CSS Purpose CSS allow you to specify the style in which your XML elements are displayed. CSS were originally.
1 Web Development CSS (Cascading Style Sheet). 2 1.Setting rules for multiple elements To decrease the amount of typing for setting rules for multiple.
©SoftMoore ConsultingSlide 1 Introduction to HTML: Cascading Style Sheets.
Cascading Style Sheets Web Design Fairport High School.
CSS properties Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 1.
Styling Fonts & Text CHAPTER 4 1 CHARLES WYKE-SMITH: STYLIN’ WITH CSS: A DESIGNER’S GUIDE (3 ND EDITION)
Web Design (14) CSS Formatting Text. Formatting Text In Brackets, go to your ‘externalcss’ website and find the ‘formattingtext’ page. Use the ‘main’
Creating Layouts with CSS. Span tag Here is some underlined text. Here is some blinking text. Here's some bold text.
Class & ID Selectors, Font and List Properties. Id Selectors  # followed by Id-name (without space)  Can be used once on a page  Examples: #p1 { color:
ECA 228 Internet/Intranet Design I Cascading Style Sheets.
CSU - DCE Introduction to CSS CSS Text - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Text Control Instructor: Joseph.
Tutorial 3 Designing a Web Page with CSS
CSCE Chapter 3 (Cascading Style Sheets) CSCE General Applications Programming Benito Mendoza 1 By Benito Mendoza Department of Computer.
Chapter 11 & 12 CSS Style Sheets: Intro. Why CSS? Separate presentation from content – more accessible Less work – can change appearance of whole site.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
1 CS428 Web Engineering Lecture 07 Font, Text & Background (CSS - II)
Formatting Text with HTML and CSS. Summary block-level elements. Character-level elements Logical and physical style Special elements: hr,address, quotation.
CSS Details Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  To use CSS properties for fonts  Evaluate whether to use pts,
Formatting with Styles. Choosing a Font Family font-family property has a special characteristics: you can specify more than one font h1, h2 {font-family:”Arial.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 10: Formatting Text with Styles.
Cascading Style Sheets Robin Burke ECT 270. Outline CSS properties Fonts Alignment Color CSS selection selectors.
TYPEFACE TERMINOLOGY SERIFSANS-SERIFMONOSPACE BASELINE TYPEFACE TERMINOLOGY.
CONFIGURING COLOR AND TEXT WITH CSS Chapter 3. Cascading Style Sheets (CSS) Used to configure text, color, and page layout. Launched in 1996 Developed.
CS3220 Web and Internet Programming CSS Basics
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
CSS – Properties & Values
CMPE 280 Web UI Design and Development September 4 Class Meeting
CS3220 Web and Internet Programming CSS Basics
Chapter 7 Web Typography
CMPE 280 Web UI Design and Development February 7 Class Meeting
CS3220 Web and Internet Programming CSS Basics
Lesson 5 Topic B – Basic Text & Fonts
Session IV Chapter 15 - How Work with Fonts and Printing
CMPE 280 Web UI Design and Development September 5 Class Meeting
Presentation transcript:

Session 3.2.

Objectives Setting the font family Setting the font size Working with Web fonts Setting font faces and sizes Setting font and text appearances Aligning text horizontally Aligning text vertically

Styling Web Page Text: Font Family What is a font family? Default font family on your browser Syntax: font-family: fonts; Where fonts is a font typeface or a list of font typeface Example: font-family: Arial Black, Georgia, Tahoma;

Styling Web Page Text: Font Size Syntax: font-size: size; Font size unit of measurement: Absolute units: mm, cm, in, pt, pc, px font-size: 12 pt; Relative units: em, % font-size: 2em; font-size: 200%;

Practice – Font Family and Size 1. In hs_styles.css, set the default font typeface to Trebuchet MS, Helvetica, and sans-serif 2. For the caption within the figure box, set the font size to 14 pixels 3. For the h1 headings nested within the section element, set the font size to 2.5em 4. For address elements nested within the footer element, use fonts from the list Palatino Linotype, Book Antiqua, Palatino, and serif

Working with Web Fonts Each browser supports different fonts. Solution: Web safe fonts Disadvantages

Working with Web fonts Web fonts Specifications for downloadable fonts are used in the CSS Still a challenge? FormatBrowser TrueType/OpenType (.ttf)Chrome, Firefox, Opera, Safari Embedded OpenType (.eot)Internet Explorer Scalable Vector Graphics (.svg)Chrome, Opera, Safari Web Open Font Format (.woff)Firefox, other browsers in development

Working with Web fonts Installing a cross-browser Web { font-family: ‘name'; src: url('eot'); src: local('☺'), url(‘file.woff’) format (‘woff’), url(‘file.ttf') format('truetype'), url(‘file.svg') format('svg'); }

Practice – Web Fonts 1. For the h1 headings nested within the section element, use the font list containing the CloisterBlack and fantasy fonts.

Setting Font Faces and Sizes To set kerning (the space between letters), use the following style property: letter-spacing: size; To set tracking (the space between words), use the following style property: word-spacing: size; To set leading (the space between lines of text), use the following style property: line-height: size;

Setting Font Faces and Sizes To set the indentation of the first line of a block of text, use the following style property: text-indent: size;

Setting Font and Text Appearances To specify the font style, use font-style: type; where t y pe is normal, italic, or oblique. To specify the font weight, use font-weight: type; where type is normal, bold, bolder, light, lighter, or a font weight value.

Setting Fonts and Text Appearances To specify a text decoration, use text-decoration: type; where type is none, underline, overline, or line-through. To transform text, use text-transform: type; where type is capitalize, uppercase, lowercase, or none. To display a font variant of text, use font-variant: type; where type is normal or small-caps

Practice – Font Faces and Sizes 1. For unordered lists within the nav element, set the the line height to 3.5em and indent the text 5 pixels. 2. For the caption within the figure box, display the text in italic.

Combining All Text Formatting in a Single Style You can combine most of the text and font styles into a single property using the shortcut font property font: font-style font-variant font- weight font-size/line-height font- family; Example: font: italic small-caps bold 2em/24px Helvetica, sans-serif;

Font Trends: Are You Trendy?

Aligning Text Horizontally Syntax: text-align: alignment; With alignment being left, center, right, or justify Example: text-align: center;

Aligning Text Vertically Syntax: vertical-align: alignment; With alignment being baseline, bottom, middle, sub, super, text-bottom, text-top, top Example: vertical-align: top;

Practice – Aligning 1. Center the contents of figure boxes. 2. Center the caption text within the figure box.