CSS. Text & Font Properties. Copyright DevelopIntelligence LLC

Similar documents
Chapter 12: FORMATTING TEXT

Web Site Design and Development Lecture 6

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2)

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100

Appendix D CSS Properties and Values

Introduction to CSS. Fijihosting.com Introduction to CSS page 1. What are style sheets? Lovely! How do I use them?

CSS: Formatting Text. CSS for text processing: font-family. Robert A. Fulkerson

CASCADING STYLESHEETS

COSC 2206 Internet Tools. CSS Cascading Style Sheets

IDM 221. Web Design I. IDM 221: Web Authoring I 1

The building block of a CSS stylesheet. A rule consists of a selector and a declaration block (one or more declarations).

Introduction to Web Tech and Programming

Adding CSS to your HTML

ACSC 231 Internet Technologies

CSS: The Basics CISC 282 September 20, 2014

CMPT 165: More CSS Basics

Creating A Website - Part 1: Web Design principles, HTML & CSS. CSS Color Values. Hexadecimal Colors. RGB Color

Introduction to Web Design CSS Reference

Lecture 10. CSS Properties. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

Introduction to Web Design CSS Reference

CSS Styles Quick Reference Guide

1 of 7 11/12/2009 9:29 AM

CSc 337 LECTURE 3: CSS

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo

Session 3.1 Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external style sheets Understand style

Cascading Style Sheet Quick Reference

Let s start with the document tree

3.1 Introduction. 3.2 Levels of Style Sheets. - The CSS1 specification was developed in There are three levels of style sheets

- The CSS1 specification was developed in CSS2 was released in CSS2.1 reflects browser implementations

IMY 110 Theme 6 Cascading Style Sheets

CSS. Lecture 16 COMPSCI 111/111G SS 2018

UNIVERSITI TEKNOLOGI MALAYSIA TEST 1 SEMESTER II 2012/2013

HTML TUTORIAL ONE. Understanding What XHTML is Not

CSS Lecture 16 COMPSCI 111/111G SS 2018

3.1 Introduction. 3.2 Levels of Style Sheets. - HTML is primarily concerned with content, rather than style. - There are three levels of style sheets

8a. Cascading Style Sheet

Tutorial 3: Working with Cascading Style Sheets

CSS Selectors. element selectors. .class selectors. #id selectors

Using Dreamweaver to Create Page Layouts

- HTML is primarily concerned with content, rather than style. - However, tags have presentation properties, for which browsers have default values

User-Centered Website Development: A Human- Computer Interaction Approach

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

HTML/XML. HTML Continued Introduction to CSS

**Method 3** By attaching a style sheet to your web page, and then placing all your styles in that new style sheet.

- The CSS1 specification was developed in CSSs provide the means to control and change presentation of HTML documents

EECS1012. Net-centric Introduction to Computing. Lecture 3: CSS for Styling

Controlling Appearance the Old Way

CSC 443: Web Programming

Reading 2.2 Cascading Style Sheets

Javascript Hierarchy Objects Object Properties Methods Event Handlers. onload onunload onblur onfocus

Cascade Stylesheets (CSS)

Table of Contents Chapter 9. Working with Cascading Style Sheets ... 1

Unit 3--Alignment, Formatting Font--Size, Color, Style [Bold, Italic, and Underline] Block

CSS for Styling CS380

Review Question 1. Which tag is used to create a link to another page? 1. <p> 2. <li> 3. <a> 4. <em>

CSS Cascading Style Sheets

Text and Layout. Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 11. This presentation 2004, MacAvon Media Productions

Customizing Graphical Reports

Admin. Midterm 1 on. Oct. 13 th (2 weeks from today) Coursework:

LBS Polytechnic. Hey! Make With The Style Sheet Already, Bub!

CSE 154 LECTURE 3: MORE CSS

CS105 Course Reader Appendix A: HTML Reference

To link to an external stylesheet, the link element is placed within the head of the html page:

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web

> > > > Cascading Style Sheets basics

How to use CSS text styles

Html basics Course Outline

Typography. is the foundation of good web design

View all articles by Kevin Verdana, Tahoma, etc.) for the main body text of a site.

Web Development & Design Foundations with HTML5

Fundamentals of Web Programming a

APPLIED COMPUTING 1P01 Fluency with Technology

Chapter 4 CSS basics

Chapter 7 Typography, Style Sheets, and Color. Mrs. Johnson

Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification

Web Development & Design Foundations with HTML5

Interactive Design 1 ART263/Advanced Design for the Web ART220 Gregory Eckler. Interactive Design/Advanced Design for the Web CSS Terminology

Friendly Fonts for your Design

Floats, Grids, and Fonts

By Ryan Stevenson. Guidebook #3 CSS

CSS MOCK TEST CSS MOCK TEST III

CSS Tutorial Part 1: Introduction: A. Adding Style to a Web Page (3 options):

escuela técnica superior de ingeniería informática

Zen Garden. CSS Zen Garden

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS

2005 WebGUI Users Conference

CASCADING STYLE SHEETS (CSS) BY: RIHAM ALSMARI, PNU. Lab 4

WATER (No kerning) WATER (Automatic Kerning) WATER (Manual Kerning).

Web design and development ACS Chapter 5. Working with Text

How to Create Accessible Word (2016) Documents

5. Text CHAPTER HIGHLIGHTS 10/12/2016 CHAPTER. Text tradition. Codes for computer text. t. Font technologies. Multimedia text.

Cascading Style Sheets

Introducing Cascading Style Sheets. Cascading Style Sheet Basics Creating Styles Using Styles Manipulating Styles Text Formatting with CSS

Wanted! Introduction. Step 1: Styling your poster. Activity Checklist. In this project, you ll learn how to make your own poster.

Multimedia for the Web: Creating Digital Excitement. Multimedia Element Text

DAY 4. Coding External Style Sheets


Cascading Style Sheets. Overview and Basic use of CSS

CSS3 Basics. From & CSS Visual Dictionary Learning Curve Books, LLC

Index. CSS directive, # (octothorpe), intrapage links, 26

Transcription:

CSS Text & Font Properties 1

text-indent - sets amount of indentation for first line of text value: length measurement inherit default: 0 applies to: block-level elements and table cells inherits: yes negative numbers give an hanging indent extra help 4em - 4 M (capital letter M) wide indent 20% - 20% of page left indent -3em - -3 M wide indent 2 2

CSS: Inherit some CSS properties have inherit within their value this means that you can force them to inherit whatever their parents value is simply use inherit as the value without quotes {background-color:inherit;} 3 3

text-align - used to align text inside a block (horizontal) value: left right center justify inherit default: left for english right for hebrew applies to: block-level elements and table cells inherits: yes pretty straight forward 4 4

text-decoration - used to decorate text value: none underline overline line-through blink inherit default: none applies to: all elements inherits: no extra help you can use multiple values don t use blink - ugly & IE won t allow it if you get rid of underlined links use some other signifier 5 5

letter-spacing - used to create space between words value: length measurement, normal inherit default: normal applies to: all elements inherits: yes 6 6

word-spacing - used to create spacing between words value: length measurement, normal inherit default: normal applies to: all elements inherits: yes 7 7

text-transform - changes capitalization value: none capitalize lowercase uppercase inhert default: none applies to: all elements inherits: yes 8 8

white-space tells how to handle white space value: normal pre nowrap pre-wrap pre-line inherit default: normal applies to: all elements inherits: yes continued next page extra help http://www.w3.org/tr/css21/text.html#white-space-prop Article to show pre-wrap & pre-line! http://webdesign.about.com/od/examples/l/blstyleswhitespaceexam 9 9

white-space tells how to handle white space value: normal pre nowrap pre-wrap pre-line inherit normal all whitespace is collapsed (even carriage returns) text is wrapped to fit in browser window or block-level element pre whitespace preserved all sequence of whitespace characters (even line breaks) are rendered in the display even if the characters overflow out of their box or the screen lines are not wrapped text will be rendered in one line until a <br/> is placed to start a new line 10 10

white-space tells how to handle white space value: normal pre nowrap pre-wrap pre-line inherit nowrap whitespace collapsed no extra spaces lines are not wrapped text will be rendered in one line until a <br/> is placed to start a new line 11 11

white-space tells how to handle white space value: normal pre nowrap pre-wrap pre-line inherit pre-wrap whitespace preserved no whitespace collapsing always wraps lines preserves of line breaks 12 12

white-space tells how to handle white space value: normal pre nowrap pre-wrap pre-line inherit pre-line whitespace collapsed no extra spaces always wraps lines preserves line breaks 13 13

line-height specifies the line height value: number, length measurement, percentage normal inherit default: normal applies to: all elements inherits: yes you can have negative and positive lengths 100% = normal spacing (single spacing); 200% = double 1 = single spacing; 1.5 one and a half spacing bug in IE 6 when the element contains an inline image positioniseverything.net/explorer/lineheightbug.html 14 14

others were not going to get into visibility used to hide elements use cautiously for accessibility visible hidden collapse inherit http://www.w3.org/tr/css21/visufx.html#visibility direction specifies base writing direction of blocks ltr rtl inherit http://www.w3.org/tr/css21/visuren.html#direction unicode-bidi used for multilingual sites normal embed bidi-override inherit http://www.w3.org/tr/css21/visuren.html#propdef-unicode-bidi 15 15

CSS: Font Properties font-family choosing which font to use value: generic font family inherit default: depends on browser applies to: all elements inherits: yes p {font-family: new century schoolbook,times,serif} browser moves from left to right until it finds a font it knows multiple word font needs to be enclosed in quotation marks suggested font family verdana most readable web language (especially small fonts) 16 16

CSS: Font Properties font-family choosing which font to use 5 generic types serif fonts with hooks at the edges of letters times, times new roman, georgia sans-serif fonts with no hooks at the edges of letters arial, verdana, helvetica, geneva monospace fonts where every character takes up the same amount of space courier, andale mono cursive fonts that look like cursive handwriting apple chancery, comic sans fantasy wacky fonts: impact, western, wingdings 17 17

CSS: Font Properties font-family choosing which font to use user has to have the font installed on their machine if you use crazy fonts chances are they aren t going to see it if you want to do fun headers using graphics with an alt attribute specifying what it says 18 18

CSS: Font Properties font-style affects whether the text is slanted or vertical values: normal italic oblique inherit default: normal applies to: all elements inherits: yes oblique normal font design and slanted italic separate font type will quite possibly look the same 19 19

CSS: Font Properties font-variant normal or small caps value: normal small inherit default: normal applies to: all elements inherits: yes not all fonts have small caps if there isn t one browsers will scale down the size of uppercase letters 20 20

CSS: Font Properties font-weight determines text boldness value: normal bold bolder lighter 100 200 300 400 500 600 700 800 900 inherit default: normal applies to: all elements inherits: yes most fonts on the web only have normal and bold (so the keywords probably won t work) you can specify boldness with color normal = 400 and bold = 700 browser support is not wide spread for these yet 21 21

CSS: Font Properties font-size specify the size of a font we talked about this on slide 63 values: length unit, percentage, xx-small x-small small medium large x-large xx-large smaller larger inherit 22 22

CSS: Font Properties font the font property can be combined! here is the ordering any combination (including none) of font-style, font-variant, font-weight in any order font-size (required) /line-height (optional) font-family (required) p {font:italic small-caps bold.8em/2 Comic sans, arial sans-serif} p { font-style: italic; font-variant: small-caps; font-weight: bold; font-size:.8em; font-height: 2em; font-family: Comic sans, arial sans-serif ; } 23 23