COS 125 DAY 10. Agenda  Capstone Proposals Due Recieved 5 Capstone Project Description sp 09.htm  Assignment 4 not corrected  Assignment 5 Posted Due.

Slides:



Advertisements
Similar presentations
Cascading Style Sheets (CSS): Pixel-Level Control with HTML Ease
Advertisements

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} //
Measurement Many CSS properties (values within the declaration) require that you specify a unit of measurement, such as spacing between elements, border.
Session Objectives Setting the font family Setting the font size Working with Web fonts Setting font faces and sizes Setting font and text appearances.
CS4370/6370 Web Development Cascading Style Sheets (CSS)
Week 7 Web Typography. 2 Understanding Type Design Principles.
Web Design & Development Cascading Style Sheets (CSS)
COS 125 DAY 17. Agenda  Assignment #5 Corrected 6 A’s, 2 B’s, 3 C’s 2 D’s, and 2 non-submits  Next Capstone Progress Report Due April 6  Exam #3 Graded.
1 CSS Styling with Fonts and Colors. 2 CSS Cascading Style Sheets and fonts CSS provides Style or Presentation options for our html pages CSS properties.
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.
CSS Properties on Parade PropertyValid valuesExample font-familylist of fonts (separate with commas, end with generic font: serif, sans-serif, fantasy,
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.
Web Design – Sec 4-6 and 4-7 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
CSS1-1 Cascading Style Sheets (CSS) Xingquan (Hill) Zhu
1 Working with Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size,
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.
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
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.
1 To Create an Internal Style Sheet 1. At the top of your HTML document, between the and tags type. 2. Type the name of the tag whose properties you wish.
XP New Perspectives on XML Tutorial 5 1 TUTORIAL 5 CSS Tutorial – Carey ISBN
Chapter 12 Cascading Style Sheets: Part II The Web Warrior Guide to Web Design Technologies.
(CSS) More Details Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
CASCADING STYLE SHEETS. Chapter 3 Objectives Customize HTML elements Specify Font characteristics Classes Tag style Inline and block-level elements External.
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.
Files you will need ... Black Goose Bistro Summer Menu
Basics of Web Design Chapter 6 More CSS Basics Key Concepts.
 Cascading Style Sheets (CSS) ◦ Used to specify the presentation of elements separately from the structure of the document.  Inline style ◦ declare.
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.
DHTML AND JAVASCRIPT Genetic Computer School LESSON 4 CASCADING STYLE SHEET G H E F.
CIS234A Lecture 5 Instructor Greg D’Andrea. Font Styles Review Font-Family: generic family, font family Font-Size: em, pt, px, %, mm, cm, in Font-Style:
CSS properties Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 1.
Developing Web Applications with HTML and CSS “Selectors and Properties”
CSS Fonts. The Font properties allow you to change the font family, boldness, size, and the style of a 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:
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.
CONFIGURING COLOR AND TEXT WITH CSS Chapter 3. Cascading Style Sheets (CSS) Used to configure text, color, and page layout. Launched in 1996 Developed.
CSS.
CS3220 Web and Internet Programming CSS Basics
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Cascading Style Sheets (Formatting)
CSS – Properties & Values
The Internet 10/13/11 The Box Model
CSS Style Sheets: Intro
Cascading Style Sheets Color and Font Properties
CS3220 Web and Internet Programming CSS Basics
CSS Styles Fonts and Colors.
CS3220 Web and Internet Programming CSS Basics
Lesson 5 Topic B – Basic Text & Fonts
Session IV Chapter 15 - How Work with Fonts and Printing
Cascading Style Sheets™ (CSS)
Cascading Style Sheets
Presentation transcript:

COS 125 DAY 10

Agenda  Capstone Proposals Due Recieved 5 Capstone Project Description sp 09.htm  Assignment 4 not corrected  Assignment 5 Posted Due March 9:35 AM  Quiz 1 will be on March 2 Chapters m/c and 4 short essay Open book, open notes Available from 9-11 AM Announcement will appear with password  Lecture/Discuss Formatting With Styles

Learning Objectives Chap 10  Understand how to set a style for a font family  Describe how to embed fonts on a page  Understand how to write style rules to make text in italics, in bold, in varying sizes, and with varying line height.  Understand how to control tracking and kerning, white space and text alignment  Understand how to write font styles in shorthand  Review how to set text Color and text background  Understand how to use both positive and negative indents  Learn to change text case, create small caps and use text decorations

Formatting with Styles  Allows for more possibilities than xHTML formatting  Separate Format from Content  Examples of everything in this lecture available at tm tm

Choosing a font family  Not all fonts are available on all PCs  Allows you a pick of group of possible fonts to use  There is no limit to the names of fonts you can use for a font-family group  Font name will be tried in the order given until one of the fonts is available to browser  Selector {font-family:“font 1”, “font 2”, “default font”;}  Generic fonts for default serif, sans-serif, cursive, fantasy and monospace  Example h1{font-family:“Times New Roman”, serif} H2{font-family:“courier”, “helvetica”, sans-serif}

Embedding Fonts on a Page  Force browser to use a font you choose Must make font available to Browser  Use the following before your refer to src: url(font.eot)}  You must create the *.eot file with special program mbedding/weft3/default.htm?fname=%20&fsiz e mbedding/weft3/default.htm?fname=%20&fsiz e  Doesn’t work with all browsers  Advice: Don’t bother.. Too much effort with little results Create a transparent gif instead

Creating Italics  Use to Italicize fonts selector { font-style:italic} Can also use oblique for fonts that do not have a italicize version  To remove italics Selector {font-style:normal}  Example.emph{font-style:italic} h3{font-family:sans-serif, font-style:oblique}

Applying Bold Formatting  Allows you to vary boldness of text selector{font-weight:bold} Can also use “bolder” or “lighter” Can also use a multiple of 100 to 900  400 is normal  700 is bold Can also set to “normal”  Examples h1{font-weight:normal} em{font-weight:800}

Setting Font Size  Two methods Specific Font size  Selector{font-size:18px}  Size in pixels  keywords xx-small, x-small, small, medium, large, x- large or xx-large Relative to parent  Selector{font-size:2em or 200%}  1em = 100%,.75em = 75%  Keywords larger or smaller  Examples  h1{font-size:25px}  p{font-size:90%}

Setting Line Height  Sets the amount of space between lines  Selector{line-height:2 or 150% or 18px} In pixels use 18px For percentage above font size in line use 150% For twice font size use 2

Setting all Font values at once  Use the property font: First set font-style (italic, oblique or normal) Then set font-weight (normal, bold, bolder, lighter or n*100) Then set small caps (normal small-caps) The above 3 can be omitted, if so they are set to normal Type font size If desired /N where N is line-height Then type in font-family values  Examples h1{font:italic,bold,small-caps, 20px, “Arial”, serif} h2{font: 20px/150%, “Times New Roman”, serif}

Setting the Text Color  Sets the color of the text Selector{color: blue or #0000ff or rgb(0,0,255) or rgb(0%, 0% 100%)} Value can be one of 16 predefined colors #rrggbb hexidecimal rgb(r,g,b) where each letter is rgb(r%,g%,b%) where each each letter is  Examples h1{color:red} h1{color:#aabbff} h1{color:rgb(128,128,255) h1{color:rgb(50%,50%,100%)

Changing the Text’s Background  Each element can have a background color or image  Selector{backgound:blue or #0000FF} Can also set to “transparent” Can also be set to an image using url(image.gif)  Type “repeat” to tile  “Repeat-x” or “repeat-y” to tile direction only  no-repeat to prevent tiling  Fixed or scroll to determine whether background moves with element  Can also to a specific location using X Y  Examples body{background:blue} body{background:url(picture.gif) repeat fixed) p{background:url(picture.gif) repeat scroll) body{background:url(picture.gif) fixed x=center, y=center)

Controlling spacing  Spacing between words (tracking) Selector{word-spacing:length)  Spacing between letter (kerning) Selector{letter-spacing:length)  Length can be Size in pixels 16px 20px “normal” for default browser setting Relative to parent length 1em 1.4em  Examples p{word-spacing:1.3em,letter-spacing:12px)

Adding indents  Indentation is how much space before first line in paragraph  p{text-indent:lenght}  Length can be Size in pixels 16px 20px 0 for no indent Relative to parent length 1em 1.4em Negative number for “hanging” indent

Setting White Space Properties  With spaces (blanks and returns) in xHTML are ignored or displayed as a single space  You can use white-space property to modify that behavior  Selector{white-space:pre or nowrap or normal} pre shows all space (preformatted) nowrap ignores returns normal is default behavior  Example p{white-space:pre}

Aligning Text  Allows you to align text for certain elements May effect spacing  Selector{text-align:left or right or justify or center} Left means align to left border Right means align to right border Justify means align top both borders Center means align to center of screen  Examples h1{text-align:center} p{text-align:justify}

Changing text case  Can change text from uppercase to lowercase or vice versa or capitalize first letter of each word  Selector{text-transform:capitalize or uppercase or lowercase}  Examples h1{text-transform:capitalize) h2{text-transform:uppercase} small{text-transform:lowercase}

Using Small Caps  Some fonts have smaller versions of uppercase letters  Selector{font-variant:small-caps}  Example h2{font-variant:small-caps)

Decorating Text  Lets you modify text with underlines, overlines, lines through text and blinking  Selector{text-decoration: value} “value” can  underline  overline  line-through  blink  Examples h1{text-decoration:blink} h1{text-decoration:underline}  Blink does not work with all browsers

Tony’s Gee-Whiz tip of the day  W3Shools has a website where you can try CSS style rules asp asp Learning by doing

Assignment 5 Cos125 assignment5_9.doc