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

Similar documents
CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

Appendix D CSS Properties and Values

Reading 2.2 Cascading Style Sheets

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

CSS: The Basics CISC 282 September 20, 2014

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

Controlling Appearance the Old Way

<body bgcolor=" " fgcolor=" " link=" " vlink=" " alink=" "> These body attributes have now been deprecated, and should not be used in XHTML.

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

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

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

Introduction to Web Design CSS Reference

Introduction to Web Design CSS Reference

CSS. Lecture 16 COMPSCI 111/111G SS 2018

ADDING CSS TO YOUR HTML DOCUMENT. A FEW CSS VALUES (colour, size and the box model)

CSS Lecture 16 COMPSCI 111/111G SS 2018

COSC 2206 Internet Tools. CSS Cascading Style Sheets

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

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

Cascade Stylesheets (CSS)

Adding CSS to your HTML

CMPT 165 Unit 3 CSS Part 1. Sept. 24 th, 2015

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.

Web Development & Design Foundations with HTML5

Web Development & Design Foundations with HTML5

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

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

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

Lecture B3 Style : Algorithmic Thinking. Computing and Art : Nature, Power, and Limits CC 3.12: Fall 2007

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

CSS for Styling CS380

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

Chapter 12: FORMATTING TEXT

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

CSC 443: Web Programming

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

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

CSS Styles Quick Reference Guide

ID1354 Internet Applications

Fundamentals of Web Programming a

Introduction to Web Tech and Programming

CMPT 165: More CSS Basics

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

CMPT 165 Advanced XHTML & CSS Part 3

Cascading Style Sheet Quick Reference

WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

Introduction to Cascading Style Sheets

ICT IGCSE Practical Revision Presentation Web Authoring

CSS. Text & Font Properties. Copyright DevelopIntelligence LLC

Using Dreamweaver. 6 Styles in Websites. 1. Linked or Imported Stylesheets. 2. Embedded Styles. 3. Inline Styles

CSc 337 LECTURE 3: CSS

INTERNATIONAL UNIVERSITY OF JAPAN Public Management and Policy Analysis Program Graduate School of International Relations

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

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

Cascading Style Sheets (CSS)

Cascading Style Sheets. Overview and Basic use of CSS

INFORMATICA GENERALE 2014/2015 LINGUAGGI DI MARKUP CSS

How to create and edit a CSS rule

CASCADING STYLESHEETS

Lab Introduction to Cascading Style Sheets

.hedgehog { background-image: url(backyard.jpg); color: #ffff99; height: 6in; width: 12in; } .tube {

CSS.

Web Site Design and Development Lecture 6

Chapter 3 Style Sheets: CSS

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

Web Site Design and Development Lecture 5

ACSC 231 Internet Technologies

CSS Cascading Style Sheets

Using Dreamweaver CC. 6 Styles in Websites. Exercise 1 Linked Styles vs Embedded Styles

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

UNIVERSITI TEKNOLOGI MALAYSIA TEST 1 SEMESTER II 2012/2013

Three Ways to Use CSS:

In this project, you ll learn how to create a webpage for your favourite recipe.

8a. Cascading Style Sheet

How to Create Accessible Word (2016) Documents

Networks and Web for Health Informatics (HINF 6220) Tutorial 8 : CSS. 8 Oct 2015

ICT IGCSE Practical Revision Presentation Web Authoring

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

Web Design and Development Tutorial 03

Using Dreamweaver CS6

Assignments (4) Assessment as per Schedule (2)

Session 4. Style Sheets (CSS) Reading & References. A reference containing tables of CSS properties

2005 WebGUI Users Conference

To illustrate how to set TAG styles the <body> and <h1> tags (for the BODY and the HEADING 1 styles) will be adjusted.

First Name Last Name CS-081 March 23, 2010 Midterm Exam

The Benefits of CSS. Less work: Change look of the whole site with one edit

McMaster Brand Standard for Websites

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

CSE 154 LECTURE 3: MORE CSS

CSS worksheet. JMC 105 Drake University

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

Floats, Grids, and Fonts

Creating and Building Websites

HTML TUTORIAL ONE. Understanding What XHTML is Not

CISC1600-SummerII2012-Raphael-lec3 1

Comp-206 : Introduction to Software Systems Lecture 23. Alexandre Denault Computer Science McGill University Fall 2006

ITNP43: HTML Lecture 4

Transcription:

Midterm 1 on Admin Oct. 13 th (2 weeks from today) Coursework: E1 grade released: please see Karoon (TA) at his office hours (Tues at 12-1pm) E2 due tomorrow E3 posted yesterday; due this Friday 11:59pm

CSS Today s Agenda Recap highlights from last week Learn about fonts Markup: attributes E2 and E3 CMPT 165 D1 (Fall 2015) 2

CMPT 165 Unit 3 CSS Part 2 Sept. 29 th, 2015

Markup vs. CSS Why CSS? (recap) Task of semantic annotation vs. visual styling (formatting) Assign semantic meaning vs. visual properties paragraph vs. list vs. a paragraph in red vs. in blue Some (old) tags are formatting in nature Q: remember which ones? Ans: <i> <b> Good to know about them, but avoid using them We ll see today how we format text with CSS CMPT 165 D1 (Fall 2015) 4

CSS syntax Syntax of content of CSS/style tag Selector may refer to any number of elements that you are formatting Declarations are separated by semicolons! Abstraction: selector1 { } selector2 { Declaration property_1: value_1; property_2: value_2; property_n: value_n; Curly brace property_1: value_1; property_m: value_m; } Concrete examples: ul { list-style-type: circle; } ol { start: c; } h1 { text-align: center; } h2 { text-align: center; } 5

CMPT 165 D1 (Fall 2015) 6

CMPT 165 D1 (Fall 2015) 7

CMPT 165 D1 (Fall 2015) 8

CMPT 165 D1 (Fall 2015) 9

Examine both markup + CSS What do you see as problematic? CMPT 165 D1 (Summer 2005) 10

What do you see as problematic? Rather than inline CSS, best move to CSS CMPT 165 D1 (Summer 2005) 11

CSS: selecting multiple tags Grouping declarations by selector: my_style.css h1, h2, h3 { text-align: center; } p, h1, h2, h3, h4, h5, h6 { color: blue; } p, h1, h2, h3 { text-align: center; color: red; } CMPT 165 D1 (Summer 2005) 12

How to improve? h1, p { text-align: center; } <ol> <li>you will need </li> <li>preheat oven </li> </ol> <h1>dafdfa</h1> <p>adfdsaf</p> CMPT 165 D1 (Fall 2015) 13

Q: Attributes??? Please be reminded that the W3C reference http://www.w3schools.com/html/html_attributes.asp is your friend CMPT 165 D1 (Fall 2015) 14

CMPT 165 D1 (Fall 2015) 15

CMPT 165 D1 (Fall 2015) 16

The title attribute Specifies extra information about an element Most often shown as a tooltip text when the mouse hovers (moves) over the element CMPT 165 D1 (Fall 2015) 17

Q: Attributes??? Accessibility??? Please be reminded that the W3C reference http://www.w3schools.com/html/html_attributes.asp is your friend Q: Making your webpages more accessible means what? Ans: Help your visitors better navigate your website; countless ways to do this; for now: Text caption to deal with broken links? Provide tooltips to convey additional info We ll see more ways in coming weeks CMPT 165 D1 (Fall 2015) 18

Questions? 19

CSS Level 1 Style-support for: Colour of element text, backgrounds, etc. Font properties: typeface and emphasis Alignment of elements (text, images, etc.) Text formatting: e.g. spacing of words, letters, lines Boxing: margin, border, padding, and positioning Unique identification: explained later Generic classification: explained later CMPT 165 D1 (Fall 2015) 20

RGB model Primary colors : Red + Green + Blue Additive model: i.e. Red + Green = Yellow Red + Blue = Purple System for specifying web colors A numerical value reflecting intensity ( strength ) of a color channel Examples 5 is brighter than 0 8 is brighter than 5 3 channels 3 sets of values Example: Bright red given by RGB #900 http://en.wikipedia.org/ wiki/file:additivecolor.svg CMPT 165 D1 (Fall 2015) 21

Colours 17 standard colour presets in CSS Level 1 (123 non-standard ones) White Silver Gray Black Red Maroon Yellow Olive Orange Lime Green Aqua Teal Blue Navy Fuchsia Purple CMPT 165 D1 (Fall 2015) 22

Color specification Decimal system (base=10): 0 1 2 3 4 5 6 7 8 9 Darkest Brightest This is not used in CSS! CSS uses hex system Hexadecimal system (base=16): 0 1 2 3 4 5 6 7 8 9 A B C D E F Darkest Brightest Example: Brightest red? RGB = X X X? CMPT 165 D1 (Fall 2015) = F 0 0 23

Red Green Blue 0 1 2 3 4 5 6 7 8 9 Examples: Decimal Brightest green? 0 9 0 Dark green? 0 4 0 Brightest blue? 0 0 9 Dark red? 4 0 0 Purple? 4 0 4 Dark purple? 1 0 1 Gray? 4 4 4 Darker gray? 2 2 2 0 1 2 3 4 5 6 7 8 9 A B C D E F Hexadecimal 0 F 0 0 7 0 0 0 F 7 0 0 7 0 7 2 0 2 7 7 7 4 4 4 1 20% of 16 2/10*16 = 3.2 Closet is 3 3 rd value is 2 2 30% of 16 3/10*16 = 4.8 Closest is 5 5-th value is 4 24

CSS Level 1 Style support for: Color of element text, backgrounds, etc. Font properties: typeface and emphasis Alignment of elements (text, images, etc.) Text formatting: e.g. spacing of words, letters, lines Boxing: margin, border, padding, and positioning Unique identification: explained later Generic classification: explained later CMPT 165 D1 (Fall 2015) 25

Q: What key visual feature differentiate the blue group from the green group? Live as if you were to die tomorrow. Learn as if you were to live forever. Be yourself; everyone else is already taken You only live once, but if you do it right, once is enough. Be the change that you wish to see in the world. CMPT 165 D1 (Fall 2015) 26

Serif Dutch word meaning line Found more often in print, for header Claims to improve readability, but no empirical evidence supports the claim Live CMPT 165 D1 (Fall 2015) 27

What features are differentiating between these groups? Serif San serif sans means without in French Live as if you were to die tomorrow. Learn as if you were to live forever. Be yourself; everyone else is already taken You only live once, but if you do it right, once is enough. Be the change that you wish to see in the world. CMPT 165 D1 (Fall 2015) 28

Serif Fonts San serif CMPT 165 D1 (Fall 2015) 29

Font-specification in CSS Various properties: refer to W3c references h1 { font-weight: bold; font-size: 12pt; line-height: 14pt; font-family: helvetica; } h1 { font: bold 12pt/14pt helvetica } CMPT 165 D1 (Fall 2015) 30

Example font faces Serif Specific font-families: new times roman, Bodoni San serif Specific font-families: "arial, verdana, Fantasy Specific font-families: Broadway ALGERIAN Cursive: scriptlike Specific font-families: Bradly Hand ITC, Comic San MS Monospace: mono =single; typewriter Eg. courier new MS MicroSoft; may not be available on Mac CMPT 165 D1 (Fall 2015) 31

CMPT 165 D1 (Summer 2005) 32

Font-specification in CSS System fonts: already installed on computer Newer fonts not necessarily accessible to all body { font-weight: bold; font-size: 12pt; line-height: 14pt; font-family: "Bodini", "Georgia", "Times", serif; } Specific family-names Generic CMPT 165 D1 (Fall 2015) 33

Other font properties Weight: lighter, 100, 200, 300, 400 (same as normal), 500, 600, 700 (same as bold), 800, 900, bolder Text-decoration: underline, overline, line-through Text-transform: capitalize, lowercase, uppercase CMPT 165 D1 (Fall 2015) 34

Some (formatting) tags you learned <p><b>bold Text</b></p> <p><em>emphasized Text</em></p> <p><strong>strong Text</strong></p> <p><i>italic Text</i></p> <p><del>strikethrough Text</del></p> <p><code>computer Code Text</code></p> <p>x<sup>superscript</sup></p> <p>y<sub>subscript</sub></p> a 2 +b 2 =c 2 y 1 = x 2 Demo CMPT 165 D1 (Fall 2015) 35

CSS Level 1 Style support for: Color of element text, backgrounds, etc. Font properties: typeface and emphasis Alignment of elements (text, images, etc.) Text formatting: e.g. spacing Boxing: margin, border, padding, and positioning Unique identification: explained later Generic classification: explained later text-align: { center justify left right } 36

CSS Level 1 Style support for: Color of element text, backgrounds, etc. Font properties: typeface and emphasis Alignment of elements (text, images, etc.) Text formatting: e.g. spacing Boxing: margin, border, padding, and positioning Unique identification: explained later Generic classification: explained later 37

Spacing p { letter-spacing: 0.5em; word-spacing: 2em; line-height: 1.5; text-align: center; } Demo 38

CSS Level 1 Style support for: Color of element text, backgrounds, etc. Font properties: typeface and emphasis Alignment of elements (text, images, etc.) Text formatting: e.g. spacing of words, letters, lines Boxing: margin, border, padding, and positioning Unique identification: explained later Generic classification: explained later 39

Units of measurement: in, cm, mm Sizes/Lengths px (pixel) = picture element em: element (relative to the current height font) ex: element (relative to x-height) pt (point): 1 pt = 1/72 of 1in pc (pica): 1 pc= 12 pt Commonly used in typography (typesetting and design) 40

Sizes/Lengths specification p { font: bold 12pt/14pt helvetica; } h1 { font-weight: bold; font-size: 2em; line-height: 2.5em; font-family: helvetica; } Demo 41

Margin, padding, border Content - Content of the box, where text and images appear Margin - Clears an area outside the border; transparent Border - A border that goes around the padding and content Padding - Clears an area around the content; transparent This is content. Demo 42

CSS Level 1 Style support for: Color of element text, backgrounds, etc. Font properties: typeface and emphasis Alignment of elements (text, images, etc.) Text formatting: e.g. spacing of words, letters, lines Boxing: margin, border, padding, and positioning Unique identification: explained later Generic classification: explained later 43

Recap of the day 3 ways for style specification Color specification: RGB model 3 ways to color specification Words hexadecimal color codes??? 3 rd way explained later Styling multiple selectors + properties simultaneously

CSS: multiple selectors + properties h1, h2, h3 { text-align: center; } p, h1, h2, h3, h4, h5, h6 { color: red; } p, h1, h2, h3 { text-align: center; color: red; } body { font: bold 12pt/14pt helvetica; } 45

Questions? 46

Tips for preparing the exams Exercise on your own: summarize key concepts seen so far in Unit 1 + Unit 2 For all coursework: start by writing the code in paper + pen! CMPT 165 D1 (Fall 2015) 47