CMPT 165 Advanced XHTML & CSS Part 3

Size: px
Start display at page:

Download "CMPT 165 Advanced XHTML & CSS Part 3"

Transcription

1 CMPT 165 Advanced XHTML & CSS Part 3 Oct 15 th, 2015

2 Today s Agenda Quick Recap of last week: Tree diagram Contextual selectors CSS: Inheritance & Specificity Review 1 exam question Q/A for Assignment 1

3

4 Contextual selectors <ol> <li>item <ul> <li> Item </li> <li> Item </li> <li> Item <ul> <li>item</li> <li>item</li> </ul> </li> </ul> </li> <li>item <ul> <li> Item </li> <li> Item <ol> <li>item</li> </ol> </li> </ul> </li> </ol> 4 ul li { color: red; This is equivalent to above: ul element li { color: red; ul li ul { color: red;

5 Contextual selectors <ol> <li>item <ul> <li> Item </li> <li> Item </li> <li> Item <ul> <li>item</li> <li>item</li> </ul> </li> </ul> </li> <li>item <ul> <li> Item </li> <li> Item <ol> <li>item</li> </ol> </li> </ul> </li> </ol> 5 ul li { color: red; This is equivalent to above: ul element li { color: red; ul li ol { color: red; This is equivalent to above: ul ol { color: red;

6 More on contextual selectors: immediate child Represented by symbol > p strong { color: red; body More specific rule: tt > strong { color: red; em p tt p Even more specific: p > tt > strong { color: red; strong color: red 6

7 immediate child illustrated <ol> <li>item <ul> <li> Item </li> <li> Item </li> <li> Item <ul> <li>item</li> <li>item</li> </ul> </li> </ul> </li> <li>item <li> <li> Item </li> <li> Item <ol> <li>item</li> <li>item</li> </ol> </li> </ul> </li> </ol> <ol> is not immediate child of <ul> (immediate child is <li>) 7 ul ol { color: red; ol > li { color: red;?

8 More on contextual selectors: next child Represented by symbol + em+tt { color: red; body p p p What if following? em tt color: red p+p { color: red; strong Only this element is selected 8

9 More on contextual selectors: next child Represented by symbol + p What if the following? strong tt em strong+em { color: red; 9

10 Today s Agenda Quick Recap of last week: Tree diagram Contextual selectors CSS: Inheritance & Specificity Review 1 exam question Q/A for Assignment 1

11 CSS rules Inheritance is a way of propagating [cascading] property values from parent elements to their children. -- CSS3 working draft specs Specificity Allows us to override inherited rules Every stylerule has a weight on specificity Higher weight more rule power 11

12 Specificity of stylerules <body> <h1 id="h1a">heading A</h1> <h1 id="h1b" class="key">heading B</h1> <p id="p1">this is a sentence.</p> <p id="p2">this is another sentence.</p> </body> body font-family: sans-serif; color: blue; body { font-family:sans-serif; color: blue; h1 #generic, h1#h1b { color: blue; h1 { color: green; h1.key { color: red; h1#h1a h1#h1b.key p#p1 p#p2 id is more specific than class color: green; color: red; color: blue; 12

13 CSS rules Inheritance is a way of propagating [cascading] property values from parent elements to their children. -- CSS3 working draft specs Specificity Allows us to override inherited rules Every stylerule has a weight on specificity Higher weight more rule power 13

14 Measuring specificity Scoring system: An id is worth 100 Each class is worth 10 Each element is worth 1 Selector Id Class Element Total body #h1b h h1.key body { font-family:sans-serif; color: blue; #h1b { color: blue; h1 { color: green; h1.key { color: red; h1 with class key is more specific to: h1 (001).key (010) is larger than 011. Declaration in 2 nd style rule wins!

15 Measuring specificity Selector Id Class Element Total h2 strong h2 strong { font-family: serif; h2 strong { Reminder: this is a single style rule font-family: serif; font-size: 12pt; /*same specificity as above*/ (depends on selectors, not number of declarations) 15

16 p em p.key em #nav li #nav.red.key #main_body #left.key #main_body #left h1 tt em #nav, #body ol + ul table tr td ul > li Measuring specificity Selector Id Class Element Total 16

17 Measuring specificity Why? Because.key can be standalone, p.key refers to 2 levels of specificity 011 Selector Id Class Element Total p em p.key em Why? There 0 are just 21 levels of specificity 101 #nav li #nav.red.key #main_body #left Recall:.key Commas are 1+1 used to separate independent selectors that have been grouped together. #main_body #left h1 tt em #nav, #body ol + ul table tr td ul > li

18 Questions?

19 Pseudo

20 Pseudo-elements Pseudo : not actual, unreal Pseudo-element: not actual element but behaves like one Usage: style specific parts of an element Ones you may find most useful: :first-letter :first-line :before :after 20

21 Pseudo-elements Style the first letter, first line of an element p:first-letter{ color: green; font-size: xx-large; 21

22 Pseudo-elements Style the first letter, first line of an element p:first-letter{ color: green; font-size: xx-large p:first-line{ color: blue; font-variant: small-caps; 22

23 Pseudo-elements Insert additional content before or after an element :after :before blockquote:after { content: --L.T."; 23

24 Pseudo class 24

25 Pseudo-classes Pseudo-class: not actual class but behaves like one E.g. :first-child :last-child first child of an element last child of an element <div> <div id= d1 >123456</div> <div id= d2 >abc </div> <div id= d3 >abcdef</div> </div> div:first-child{ color: red; div #d1 #d2 #d3 color:red; 25

26 :last-child <div> <div id="d1"> <em id="e1">a</em> <em id="e2">b</em> </div> <div id="d2"> </div> <div id="d3"> <em id="e3">c</em> <em id="e4">d</em> </div> </div> em:last-child{ color: red; div Select all <em> tags that are last-child Browser window: a b c d div #d1 #d2 div #d3 #e1 #e2 #e3 #e4 26

27 :last-child <div> <div id="d1"> <em id="e1">a</em> <em id="e2">b</em> </div> <div id="d2"> </div> <div id="d3"> <em id="e3">c</em> <em id="e4">d</em> </div> </div> em:last-child{ color: red; div Colour only #e2 in red? div #d1 #d2 div #d3 #e1 #e2 #e3 #e4 27

28 :last-child Select all <em> tags in #d1 that are last-child em:last-child{ color: red; #d1 em:last-child{ color: red; div Color only #e2 in red? div #d1 #d2 div #d3 Browser window: a b c d #e1 #e2 #e3 #e4 28

29 More common pseudo-classes In anchor elements <a> :link unvisited link :visited visited link :active mouse clicked on link :hover mouse hover on link Called pseudo-classes, but think of them as states i.e. depends on users actions, rendered dynamically by user s browser 29

30 More common pseudo-classes Simple (good) way to add interaction with user a { text-decoration: none; color: #86759A; a:link { font-weight: bold; a:visited { font-weight: normal; a:hover, a:focus, a:active { text-decoration: underline; /*Try on your own: text-decoration: overline; */ 30 Demo

31 Notes on anchor-based pseudo-classes a:hover should come after a:link and a:visited a:active should come after a:hover Know why? Can join: a:visited:hover The state of order determines the order of CSS precedence 31

32 :hover, :active Works for any element E.g. lists, dividers, images, etc. If properly used, a good/cool way to interact with user <div id="nav"> <!-- subdivider#1 --> <ul> <li><a href="demo.html" title="home page">home</a></li> <li><a href="demo.html" title="about me" >About me</a></li> <li><a href="demo.html" title="my notes">my course notes</a></li> <li><a href="demo.html" title="contact">contact</a></li> </ul> </div> Demo 32

33 Quick recap More on contextual selectors Symbols for specific contextual selectors: Immediate child Next child Pseudo class vs. Pseudo element Measuring specificity

34 Miscellaneous items DTD Meta Character entities

35 Character entities 35

36 Character entities End of Unit 4 of Study Guide < > are part of markup tags; invalid markup on its own Character entities are used to display reserved characters E.g. non-breaking space: : Case sensitive; e.g. this won t work: &Copy; Don t forget to end with semicolon 3 ways to specify: Approach Starts with either name & decimal (dec) &# hexadecimal (hex) &#x 36

37 Common mistakes Reference Math: x, / keys for multiply sign should be avoided, use instead: &times &divide Fractions: 1 / 4 &frac14 &frac23 Double quotes: One on keyboard is use for measurement, e.g. 3'10" Curly quotes should be used, e.g. I can do it I can do it 37

38 Character entities: references Currency Math Greek and Coptic Symbols Arrows Miscellaneous 38

39

40 Take-Home Exercises??? Still not sure? Please read over this:

41 The Box Model Content - Content of the box, where text and images appear Border - A border that goes around the padding and content Padding - Clears an area around the content; transparent by default Margin - Clears an area outside the border; transparent by default How would you differentiate padding from margin??? This is content. 41

42 CMPT CMPT D1 (Fall D1 2015) (Fall 42

43 Take-Home Exercise: Q1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN " strict.dtd"> <html> <head><title>title</title> <style type="text/css"> p { width: 200px; padding: 10px; padding-left: 20px; margin: 20px; border: 5px solid #000; float: left; height: 500px; </style> </head> <body> <p>c</p> </body> <html> 43 Given code on the left: 1) What s the box model for all <p> tags? Draw your answers out. 2) And what are its dimensions?

44 Take-Home Exercise: Q2 dt { font-style: italic; What else is wrong? <h2>definition List</h2> <dl> <dt><em>dashi Broth</em></dt> <dd>a basic broth in Japanese cooking. </dd> </dl> <dl> <dt><em>short Grained Steamed Rice</em></dt> <dd>the most common rice eaten in Japan. </dd> </dl> 44

45 Style via CSS stylerule dt { font-style: italic; Lists are used to relate connected items separating as 2 lists defeat the purpose of using a list <h2>definition List</h2> <dl> <dt><em>dashi Broth</em></dt> <dd>a basic broth in Japanese cooking. </dd> </dl> <dl> <dt><em>short Grained Steamed Rice</em></dt> <dd>the most common rice eaten in Japan. </dd> </dl> 45

46 Questions?

47 Remaining agenda items CSS: last notes Positioning Functions & directives Cool features of CSS3 Coursework: Exercise 5 Assignment 1 47

48 Positioning Static: elements are positioned according to normal flow Refer as normal position Block vs. inline elements? To change: position property 3 other values 1. Fixed: does not move even if window changes size 2. Relative: relative to normal position 3. Absolute: relative to parent element 48

49 2. Relative Positioning Relative to normal position #box1 { width: 500px; height: 700px; border:.5em black solid; position: relative; top: 10px; left: 10px; #box2 { width: 500px; height: 700px; border:.5em black solid; position: relative; top: 10px; left: -10px; 49-10px 10px 10px 10px

50 3. Absolute Positioning Relative to parent #grandparent { width: 200px; height: 500px; background-color: black; #parent { width: 100px; height: 100px; background-color: orange; 50

51 3. Absolute Positioning Relative to parent #grandparent { width: 200px; height: 500px; background-color: black; #parent { width: 100px; height: 100px; background-color: orange; position: absolute; left: 10px; 10px 51

52 3. Absolute Positioning Relative to parent #grandparent { width: 200px; height: 500px; background-color: black; #parent { width: 100px; height: 100px; background-color: orange; position: absolute; left: 10px; #child{ width: 50px; height: 50px; background-color: red; position: absolute; left: 10px;? 52 10px

53 3. Absolute Positioning Relative to parent #grandparent { width: 200px; height: 500px; background-color: black; #parent { width: 100px; height: 100px; background-color: orange; position: absolute; left: 10px; #child{ width: 50px; height: 50px; background-color: red; position: absolute; left: 10px; 53 10px 10px

54 Positioning Relative to left side 10px left: 10px; Relative to right side right: 10px; 10px Relative to bottom side 54? bottom: 10px; 10px

55 Positioning <div id="box1"></div> <div id="box2"></div> #box1{ width: 500px; height: 500px; position: absolute; background-color: red; left: 100px; top: 10px; #box2{ width: 500px; height: 500px; position: absolute; background-color: orange; left: 100px; top: 30px;

56 Positioning <div id="box1"></div> <div id="box2"></div> #box1{ width: 500px; height: 500px; position: absolute; background-color: red; left: 100px; top: 10px; z-index: 2; #box2{ width: 500px; height: 500px; position: absolute; background-color: orange; left: 100px; top: 30px;

57 Positioning the z-dimension (top, left) (X, Y) (bottom, right) (X, Y) Z-index gives you depth Default of all objects: z-index: 0; Larger z-index: closer towards the viewer #box1{ width: 500px; height: 500px; position: absolute; background-color: red; left: 100px; top: 10px; z-index: 2; #box2{ width: 500px; height: 500px; position: absolute; background-color: orange; left: 100px; top: 30px; Q: an element that is on top of everything?

58 Remaining agenda items CSS: last notes Positioning Functions & directives Cool features of CSS3 Coursework: Exercise 5 Assignment 1 58

Tips from Bryan. (past student)

Tips from Bryan. (past student) Tips from Bryan (past student) 2 3 4 5 6 7 8 Questions/Tips/ Thoughts/Concerns? Students suggest An easier midterm? Nice idea, but not a valid solution; e.g. makes it harder to survive in your future upper-level

More information

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space. HTML Summary Structure All of the following are containers. Structure Contains the entire web page. Contains information

More information

CMPT 165 Advanced XHTML & CSS Part 4. Oct 20 th, 2015

CMPT 165 Advanced XHTML & CSS Part 4. Oct 20 th, 2015 CMPT 165 Advanced XHTML & CSS Part 4 Oct 20 th, 2015 Quick Q/A on A1 http://www.cs.sfu.ca/coursecentral/ 165/lisat/assign/A1.html Example of creativity It was a very cold day and Napoleon was preparing

More information

Unit 10 - Client Side Customisation of Web Pages. Week 5 Lesson 1 CSS - Selectors

Unit 10 - Client Side Customisation of Web Pages. Week 5 Lesson 1 CSS - Selectors Unit 10 - Client Side Customisation of Web Pages Week 5 Lesson 1 CSS - Selectors Last Time CSS box model Concept of identity - id Objectives Selectors the short story (or maybe not) Web page make-over!

More information

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB Unit 3 Cascading Style Sheets (CSS) Slides based on course material SFU Icons their respective owners 1 Learning Objectives In this unit you

More information

Creating and Building Websites

Creating and Building Websites Creating and Building Websites Stanford University Continuing Studies CS 21 Mark Branom branom@alumni.stanford.edu Course Web Site: http://web.stanford.edu/group/csp/cs21 Week 6 Slide 1 of 28 Week 6 Agenda

More information

Admin & Today s Agenda

Admin & Today s Agenda Admin & Today s Agenda FYI: Boshra s and Guri s office hours switched this week Take-home exercises: any one done them??? Key materials in Unit 4 2 new concepts New tags CMPT 165 D1 (Fall 2015) 1 And before

More information

CSS Cascading Style Sheets

CSS Cascading Style Sheets CSS Cascading Style Sheets site root index.html about.html services.html stylesheet.css images boris.jpg Types of CSS External Internal Inline External CSS An external style sheet is a text document with

More information

CSS: The Basics CISC 282 September 20, 2014

CSS: The Basics CISC 282 September 20, 2014 CSS: The Basics CISC 282 September 20, 2014 Style Sheets System for defining a document's style Used in many contexts Desktop publishing Markup languages Cascading Style Sheets (CSS) Style sheets for HTML

More information

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

CSS Selectors. element selectors. .class selectors. #id selectors CSS Selectors Patterns used to select elements to style. CSS selectors refer either to a class, an id, an HTML element, or some combination thereof, followed by a list of styling declarations. Selectors

More information

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

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student Welcome Please sit on alternating rows powered by lucid & no.dots.nl/student HTML && CSS Workshop Day Day two, November January 276 powered by lucid & no.dots.nl/student About the Workshop Day two: CSS

More information

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

3.1 Introduction. 3.2 Levels of Style Sheets. - The CSS1 specification was developed in There are three levels of style sheets 3.1 Introduction - The CSS1 specification was developed in 1996 - CSS2 was released in 1998 - CSS2.1 reflects browser implementations - CSS3 is partially finished and parts are implemented in current browsers

More information

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

- The CSS1 specification was developed in CSS2 was released in CSS2.1 reflects browser implementations 3.1 Introduction - The CSS1 specification was developed in 1996 - CSS2 was released in 1998 - CSS2.1 reflects browser implementations - CSS3 is partially finished and parts are implemented in current browsers

More information

CSS مفاهیم ساختار و اصول استفاده و به کارگیری

CSS مفاهیم ساختار و اصول استفاده و به کارگیری CSS مفاهیم ساختار و اصول استفاده و به کارگیری Cascading Style Sheets A Cascading Style Sheet (CSS) describes the appearance of an HTML page in a separate document : مسایای استفاده از CSS It lets you separate

More information

BIM222 Internet Programming

BIM222 Internet Programming BIM222 Internet Programming Week 7 Cascading Style Sheets (CSS) Adding Style to your Pages Part II March 20, 2018 Review: What is CSS? CSS stands for Cascading Style Sheets CSS describes how HTML elements

More information

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

<body bgcolor=  fgcolor=  link=  vlink=  alink= > These body attributes have now been deprecated, and should not be used in XHTML. CSS Formatting Background When HTML became popular among users who were not scientists, the limited formatting offered by the built-in tags was not enough for users who wanted a more artistic layout. Netscape,

More information

CSS. https://developer.mozilla.org/en-us/docs/web/css

CSS. https://developer.mozilla.org/en-us/docs/web/css CSS https://developer.mozilla.org/en-us/docs/web/css http://www.w3schools.com/css/default.asp Cascading Style Sheets Specifying visual style and layout for an HTML document HTML elements inherit CSS properties

More information

CSS Styles Quick Reference Guide

CSS Styles Quick Reference Guide Table 1: CSS Font and Text Properties Font & Text Properties Example(s) font-family Font or typeface font-family: Tahoma font-size Size of the font font-size: 12pt font-weight Normal or bold font-weight:

More information

Cascading Style Sheets (CSS)

Cascading Style Sheets (CSS) Cascading Style Sheets (CSS) Mendel Rosenblum 1 Driving problem behind CSS What font type and size does introduction generate? Answer: Some default from the browser (HTML tells what browser how)

More information

Setting a Background Image

Setting a Background Image More CSS More CSS Features Let's take a look at some more features available to us via CSS, as well as some techniques to make our CSS declarations more precise and efficient: Setting images as the background

More information

CSS. Selectors & Measurments. Copyright DevelopIntelligence LLC

CSS. Selectors & Measurments. Copyright DevelopIntelligence LLC CSS Selectors & Measurments 1 Back to descendants remember walking down the document tree structure and see how parents and children interact not only is it important to know about inheritance walking

More information

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

Admin. Midterm 1 on. Oct. 13 th (2 weeks from today) Coursework: 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

More information

Cascading Style Sheets

Cascading Style Sheets 4 TVEZEWXYHMNR LSTVSKVEQY-RJSVQEXMOENITSHTSVSZ RETVSNIOXIQ RERGSZER Q^)ZVSTWO LSWSGM PR LSJSRHYEVS^TS XYLPEZR LSQ WXE4VEL] 4VELE)9-RZIWXYNIQIHSZE% FYHSYGRSWXM CSS Cascading Style Sheets Lukáš Bařinka barinkl@fel.cvut.cz

More information

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

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo Note: We skipped Study Guide 1. If you d like to review it, I place a copy here: https:// people.rit.edu/~nbbigm/studyguides/sg-1.docx

More information

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

Using Dreamweaver CC. 6 Styles in Websites. Exercise 1 Linked Styles vs Embedded Styles Using Dreamweaver CC 6 So far we have used CSS to arrange the elements on our web page. We have also used CSS for some limited formatting. In this section we will take full advantage of using CSS to format

More information

<style type="text/css"> <!-- body {font-family: Verdana, Arial, sans-serif} ***set font family for entire Web page***

<style type=text/css> <!-- body {font-family: Verdana, Arial, sans-serif} ***set font family for entire Web page*** Chapter 7 Using Advanced Cascading Style Sheets HTML is limited in its ability to define the appearance, or style, across one or mare Web pages. We use Cascading style sheets to accomplish this. Remember

More information

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

- The CSS1 specification was developed in CSSs provide the means to control and change presentation of HTML documents 3.1 Introduction - The CSS1 specification was developed in 1996 - CSS2 was released in 1998 - CSS3 is on its way - CSSs provide the means to control and change presentation of HTML documents - CSS is not

More information

Appendix D CSS Properties and Values

Appendix D CSS Properties and Values HTML Appendix D CSS Properties and Values This appendix provides a brief review of Cascading Style Sheets (CSS) concepts and terminology, and lists CSS level 1 and 2 properties and values supported by

More information

Web Information System Design No.4 Put Style to Web Documents. Tatsuya Hagino

Web Information System Design No.4 Put Style to Web Documents. Tatsuya Hagino Web Information System Design No.4 Put Style to Web Documents Tatsuya Hagino (hagino@sfc.keio.ac.jp) 1 Web Page Components Combine orthogonal technologies content style programming style JavaScript Programming

More information

CSS: Cascading Style Sheets

CSS: Cascading Style Sheets What are Style Sheets CSS: Cascading Style Sheets Representation and Management of Data on the Internet, CS Department, Hebrew University, 2007 A style sheet is a mechanism that allows to specify how HTML

More information

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

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web HTML & CSS SWE 432, Fall 2017 Design and Implementation of Software for the Web HTML: HyperText Markup Language LaToza Language for describing structure of a document Denotes hierarchy of elements What

More information

8a. Cascading Style Sheet

8a. Cascading Style Sheet INFS 2150 Introduction to Web Development 8a. Cascading Style Sheet 1 Objectives Concepts of cascading style sheets (CSS). 3 ways of using CSS: inline styles, embedded styles, and external style sheet.

More information

Fundamentals: Client/Server

Fundamentals: Client/Server Announcements Class Web Site: http://www.cs.umd.edu/projects/passport/classes/summer2008/ You can find this link at the end of the main passport site http://www.cs.umd.edu/projects/passport/webpage/ E-mail

More information

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

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100 Introduction to Multimedia MMP100 Spring 2016 profehagan@gmail.com thiserichagan.com/mmp100 Troubleshooting Check your tags! Do you have a start AND end tags? Does everything match? Check your syntax!

More information

Co. Louth VEC & Co. Monaghan VEC. Programme Module for. Web Authoring. leading to. Level 5 FETAC. Web Authoring 5N1910

Co. Louth VEC & Co. Monaghan VEC. Programme Module for. Web Authoring. leading to. Level 5 FETAC. Web Authoring 5N1910 Co. Louth VEC & Co. Monaghan VEC Programme Module for Web Authoring leading to Level 5 FETAC Web Authoring 5N1910 Web Authoring 5N1910 1 Introduction This programme module may be delivered as a standalone

More information

Cascade Stylesheets (CSS)

Cascade Stylesheets (CSS) Previous versions: David Benavides and Amador Durán Toro (noviembre 2006) Last revision: Manuel Resinas (october 2007) Tiempo: 2h escuela técnica superior de ingeniería informática Departamento de Lenguajes

More information

Adding CSS to your HTML

Adding CSS to your HTML Adding CSS to your HTML Lecture 3 CGS 3066 Fall 2016 September 27, 2016 Making your document pretty CSS is used to add presentation to the HTML document. We have seen 3 ways of adding CSS. In this lecture,

More information

Unveiling the Basics of CSS and how it relates to the DataFlex Web Framework

Unveiling the Basics of CSS and how it relates to the DataFlex Web Framework Unveiling the Basics of CSS and how it relates to the DataFlex Web Framework Presented by Roel Fermont 1 Today more than ever, Cascading Style Sheets (CSS) have a dominant place in online business. CSS

More information

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

Session 4. Style Sheets (CSS) Reading & References.   A reference containing tables of CSS properties Session 4 Style Sheets (CSS) 1 Reading Reading & References en.wikipedia.org/wiki/css Style Sheet Tutorials www.htmldog.com/guides/cssbeginner/ A reference containing tables of CSS properties web.simmons.edu/~grabiner/comm244/weekthree/css-basic-properties.html

More information

Exam Format: Multiple Choice, True/False, Short Answer (3 points each 75 points total) Write-the-page (25 points)

Exam Format: Multiple Choice, True/False, Short Answer (3 points each 75 points total) Write-the-page (25 points) CS-101 Fall 2008 Section 4 Practice Final v1.0m Name: Exam Format: Multiple Choice, True/False, Short Answer (3 points each 75 points total) Write-the-page (25 points) XHTML/CSS Reference: Entities: Copyright

More information

Using Dreamweaver CS6

Using Dreamweaver CS6 6 So far we have used CSS to arrange the elements on our web page. We have also used CSS for some limited formatting. In this section we will take full advantage of using CSS to format our web site. Just

More information

Lab 4 CSS CISC1600, Spring 2012

Lab 4 CSS CISC1600, Spring 2012 Lab 4 CSS CISC1600, Spring 2012 Part 1 Introduction 1.1 Cascading Style Sheets or CSS files provide a way to control the look and feel of your web page that is more convenient, more flexible and more comprehensive

More information

CSC309 Tutorial CSS & XHTML

CSC309 Tutorial CSS & XHTML CSC309 Tutorial CSS & XHTML Lei Jiang January 27, 2003 1 CSS CSC309 Tutorial --CSS & XHTML 2 Sampel XML Document

More information

Assignments (4) Assessment as per Schedule (2)

Assignments (4) Assessment as per Schedule (2) Specification (6) Readability (4) Assignments (4) Assessment as per Schedule (2) Oral (4) Total (20) Sign of Faculty Assignment No. 02 Date of Performance:. Title: To apply various CSS properties like

More information

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

Text and Layout. Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 11. This presentation 2004, MacAvon Media Productions Text and Layout Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 11 This presentation 344 345 Text in Graphics Maximum flexibility obtained by treating text as graphics and manipulating

More information

Reading 2.2 Cascading Style Sheets

Reading 2.2 Cascading Style Sheets Reading 2.2 Cascading Style Sheets By Multiple authors, see citation after each section What is Cascading Style Sheets (CSS)? Cascading Style Sheets (CSS) is a style sheet language used for describing

More information

CMPT 101 Advanced CSS Part 2. (Oct. 8 th, 2015) Oct. 20 th, 2017

CMPT 101 Advanced CSS Part 2. (Oct. 8 th, 2015) Oct. 20 th, 2017 CMPT 101 Advanced CSS Part 2 (Oct. 8 th, 2015) Oct. 20 th, 2017 1. Raise your hand 2. Yell out your seat number. 3. Answer question: Attendance If you did not do your HW6, tell us an example of inline

More information

GIMP WEB 2.0 MENUS WEB 2.0 MENUS: HORIZONTAL NAVIGATION BAR CREATING AN HTML LIST

GIMP WEB 2.0 MENUS WEB 2.0 MENUS: HORIZONTAL NAVIGATION BAR CREATING AN HTML LIST GIMP WEB 2.0 MENUS Web 2.0 Menus: Horizontal Navigation Bar WEB 2.0 MENUS: HORIZONTAL NAVIGATION BAR Hover effect: CREATING AN HTML LIST Most horizontal or vertical navigation bars begin with a simple

More information

Cascading Style Sheets Level 2

Cascading Style Sheets Level 2 Cascading Style Sheets Level 2 Course Objectives, Session 1 Level 1 Quick Review Chapter 6 Revisit: Web Fonts Chapter 8: Adding Graphics to Web Pages Chapter 9: Sprucing Up Your Site s Navigation Begin

More information

Cascading Style Sheet

Cascading Style Sheet Extra notes - Markup Languages Dr Nick Hayward CSS - Basics A brief introduction to the basics of CSS. Contents Intro CSS syntax rulesets comments display Display and elements inline block-level CSS selectors

More information

Parashar Technologies HTML Lecture Notes-4

Parashar Technologies HTML Lecture Notes-4 CSS Links Links can be styled in different ways. HTML Lecture Notes-4 Styling Links Links can be styled with any CSS property (e.g. color, font-family, background, etc.). a { color: #FF0000; In addition,

More information

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

CSS: Formatting Text. CSS for text processing: font-family. Robert A. Fulkerson CSS: Formatting Text Robert A. Fulkerson College of Information Science and Technology http://www.ist.unomaha.edu/ University of Nebraska at Omaha http://www.unomaha.edu/ CSS for text processing: font-family

More information

Cascading Style Sheet. Styles as Tag Attributes. Syntax. <h1>: what font type/size is used? STYLE = SELECTOR {RULES} Attributes such as bgcolor

Cascading Style Sheet. Styles as Tag Attributes. Syntax. <h1>: what font type/size is used? STYLE = SELECTOR {RULES} Attributes such as bgcolor Styles? Cascading Style Sheet http://www.eie.polyu.edu.hk/~nflaw/biclustering/index.html Request string: GET /~nflaw/biclustering/index.html HTTP/1.1 Host: www.eie.polyu.edu.hk 1 Response string: HTTP/1.1

More information

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

Creating A Website - Part 1: Web Design principles, HTML & CSS. CSS Color Values. Hexadecimal Colors. RGB Color Notes Week 3 By: Marisa Stoolmiller CSS Color Values With CSS, colors can be specified in different ways: Color names Hexadecimal values RGB values HSL values (CSS3) HWB values (CSS4) Hexadecimal Colors

More information

CSS. Shan-Hung Wu CS, NTHU

CSS. Shan-Hung Wu CS, NTHU CSS Shan-Hung Wu CS, NTHU CSS Zen Garden 2 Outline The Basics Selectors Layout Stacking Order 3 Outline The Basics Selectors Layout Stacking Order 4 Grammar selector { property: value; 5 Example /* for

More information

Cascading Style Sheets CSCI 311

Cascading Style Sheets CSCI 311 Cascading Style Sheets CSCI 311 Learning Objectives Learn how to use CSS to style the page Learn to separate style from structure Styling with CSS Structure is separated from style in HTML5 CSS (Cascading

More information

ITNP43: HTML Lecture 4

ITNP43: HTML Lecture 4 ITNP43: HTML Lecture 4 Niederst, Part III (3rd edn) 1 Style versus Content HTML purists insist that style should be separate from content and structure HTML was only designed to specify the structure and

More information

2. Write style rules for how you d like certain elements to look.

2. Write style rules for how you d like certain elements to look. CSS for presentation Cascading Style Sheet Orientation CSS Cascading Style Sheet is a language that allows the user to change the appearance or presentation of elements on the page: the size, style, and

More information

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

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 3.1 Introduction - HTML is primarily concerned with content, rather than style - However, tags have presentation properties, for which browsers have default values - The CSS1 cascading style sheet specification

More information

Zen Garden. CSS Zen Garden

Zen Garden. CSS Zen Garden CSS Patrick Behr CSS HTML = content CSS = display It s important to keep them separated Less code in your HTML Easy maintenance Allows for different mediums Desktop Mobile Print Braille Zen Garden CSS

More information

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148 Index Numbers & Symbols (angle brackets), in HTML, 47 : (colon), in CSS, 96 {} (curly brackets), in CSS, 75, 96. (dot), in CSS, 89, 102 # (hash mark), in CSS, 87 88, 99 % (percent) font size, in CSS,

More information

APPLIED COMPUTING 1P01 Fluency with Technology

APPLIED COMPUTING 1P01 Fluency with Technology APPLIED COMPUTING 1P01 Fluency with Technology Cascading Style Sheets (CSS) APCO/IASC 1P01 Brock University Brock University (APCO/IASC 1P01) Cascading Style Sheets (CSS) 1 / 39 HTML Remember web pages?

More information

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

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

More information

Web Design and Development Tutorial 03

Web Design and Development Tutorial 03 Table of Contents Web Design & Development - Tutorial 03... 2 Using and Applying CSS to XHTML... 2 Conventions... 2 What you need for this tutorial... 2 Common Terminology... 3 Parent / Child Elements...

More information

Web Designer s Reference

Web Designer s Reference Web Designer s Reference An Integrated Approach to Web Design with XHTML and CSS Craig Grannell Graphical navigation with rollovers The final exercise in this chapter concerns navigation with graphical

More information

CSS cont. October 5, Unit 4

CSS cont. October 5, Unit 4 CSS cont. October 5, Unit 4 Padding We can add borders around the elements of our pages To increase the space between the content and the border, use the padding property padding is shorthand for all of

More information

DAY 4. Coding External Style Sheets

DAY 4. Coding External Style Sheets DAY 4 Coding External Style Sheets LESSON LEARNING TARGETS I can code and apply an embedded style sheet to a Web page. I can code and apply an external style sheet to multiple Web pages. I can code and

More information

Deccansoft Software Services

Deccansoft Software Services Deccansoft Software Services (A Microsoft Learning Partner) HTML and CSS COURSE SYLLABUS Module 1: Web Programming Introduction In this module you will learn basic introduction to web development. Module

More information

CS193X: Web Programming Fundamentals

CS193X: Web Programming Fundamentals CS193X: Web Programming Fundamentals Spring 2017 Victoria Kirst (vrk@stanford.edu) Today's schedule Schedule: - HTML: Background and history - Complex selectors - Box model - Debugging with Chrome Inspector

More information

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

Using Dreamweaver. 6 Styles in Websites. 1. Linked or Imported Stylesheets. 2. Embedded Styles. 3. Inline Styles Using Dreamweaver 6 So far these exercises have deliberately avoided using HTML s formatting options such as the FONT tag. This is because the basic formatting available in HTML has been made largely redundant

More information

Introduction to Web Tech and Programming

Introduction to Web Tech and Programming Introduction to Web Tech and Programming Cascading Style Sheets Designed to facilitate separation of content and presentation from a document Allows easy modification of style for an entire page or an

More information

Programmazione Web a.a. 2017/2018 HTML5

Programmazione Web a.a. 2017/2018 HTML5 Programmazione Web a.a. 2017/2018 HTML5 PhD Ing.Antonino Raucea antonino.raucea@dieei.unict.it 1 Introduzione HTML HTML is the standard markup language for creating Web pages. HTML stands for Hyper Text

More information

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

- HTML is primarily concerned with content, rather than style. - However, tags have presentation properties, for which browsers have default values 3.1 Introduction - HTML is primarily concerned with content, rather than style - However, tags have presentation properties, for which browsers have default values - The CSS1 cascading style sheet specification

More information

Introduction to WEB PROGRAMMING

Introduction to WEB PROGRAMMING Introduction to WEB PROGRAMMING Web Languages: Overview HTML CSS JavaScript content structure look & feel transitions/animation s (CSS3) interaction animation server communication Full-Stack Web Frameworks

More information

CSS

CSS http://www.flickr.com/photos/baylorbear78/3406180116/ CSS 2 OVERVIEW OF CSS HTML is about content and structure (semantics) What is the content? How is the content related to other content? CSS is all

More information

CSS Cascading Style Sheets

CSS Cascading Style Sheets CSS Cascading Style Sheets site root index.html about.html services.html stylesheet.css charlie.jpg Linking to your HTML You need to link to your css in the of your HTML file.

More information

CSS means Cascading Style Sheets. It is used to style HTML documents.

CSS means Cascading Style Sheets. It is used to style HTML documents. CSS CSS means Cascading Style Sheets. It is used to style HTML documents. Like we mentioned in the HTML tutorial, CSS can be embedded in the HTML document but it's better, easier and neater if you style

More information

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

CSS3 Basics. From   & CSS Visual Dictionary Learning Curve Books, LLC CSS3 Basics From www.w3schools.com & CSS Visual Dictionary Learning Curve Books, LLC CSS Box Model Margin (top, right, bottom, left) Shorthand property, equivalent to Border-width border-style border-color

More information

CITS3403 Agile Web Development 2019 Semester 1

CITS3403 Agile Web Development 2019 Semester 1 Cascading Style Sheets CITS3403 Agile Web Development 2019 Semester 1 What is CSS? CSS stands for Cascading Style Sheets stylesheet language for web used to specify the presentation (layout and style)

More information

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

IDM 221. Web Design I. IDM 221: Web Authoring I 1 IDM 221 Web Design I IDM 221: Web Authoring I 1 Week 4 IDM 221: Web Authoring I 2 Presenta(on IDM 221: Web Authoring I 3 Up until this point everything we've focused on has been related to content, and

More information

Lab Introduction to Cascading Style Sheets

Lab Introduction to Cascading Style Sheets Lab Introduction to Cascading Style Sheets For this laboratory you will need a basic text editor and a browser. In the labs, winedt or Notepad++ is recommended along with Firefox/Chrome For this activity,

More information

COMP519 Web Programming Lecture 6: Cascading Style Sheets: Part 2 Handouts

COMP519 Web Programming Lecture 6: Cascading Style Sheets: Part 2 Handouts COMP519 Web Programming Lecture 6: Cascading Style Sheets: Part 2 Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University

More information

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

escuela técnica superior de ingeniería informática Tiempo: 2h escuela técnica superior de ingeniería informática Previous versions: David Benavides and Amador Durán Toro (noviembre 2006) Manuel Resinas (october 2007) Last revision:pablo Fernandez, Cambios

More information

Web Site Design. Stanford University Continuing Studies CS 03. Mark Branom

Web Site Design. Stanford University Continuing Studies CS 03. Mark Branom Web Site Design Stanford University Continuing Studies CS 03 Mark Branom branom@alumni.stanford.edu http://web.stanford.edu/people/markb/ Course Web Site: http://web.stanford.edu/group/csp/cs03 Week 5

More information

Tutorial 4: Creating Special Effects with CSS

Tutorial 4: Creating Special Effects with CSS Tutorial 4: Creating Special Effects with CSS College of Computing & Information Technology King Abdulaziz University CPCS-403 Internet Applications Programming Objectives Work with CSS selectors Create

More information

CSS. Lecture 16 COMPSCI 111/111G SS 2018

CSS. Lecture 16 COMPSCI 111/111G SS 2018 CSS Lecture 16 COMPSCI 111/111G SS 2018 No CSS Styles A style changes the way the HTML code is displayed Same page displayed using different styles http://csszengarden.com Same page with a style sheet

More information

HTML and CSS COURSE SYLLABUS

HTML and CSS COURSE SYLLABUS HTML and CSS COURSE SYLLABUS Overview: HTML and CSS go hand in hand for developing flexible, attractively and user friendly websites. HTML (Hyper Text Markup Language) is used to show content on the page

More information

Downloads: Google Chrome Browser (Free) - Adobe Brackets (Free) -

Downloads: Google Chrome Browser (Free) -   Adobe Brackets (Free) - Week One Tools The Basics: Windows - Notepad Mac - Text Edit Downloads: Google Chrome Browser (Free) - www.google.com/chrome/ Adobe Brackets (Free) - www.brackets.io Our work over the next 6 weeks will

More information

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

ADDING CSS TO YOUR HTML DOCUMENT. A FEW CSS VALUES (colour, size and the box model) INTRO TO CSS RECAP HTML WHAT IS CSS ADDING CSS TO YOUR HTML DOCUMENT CSS IN THE DIRECTORY TREE CSS RULES A FEW CSS VALUES (colour, size and the box model) CSS SELECTORS SPECIFICITY WEEK 1 HTML In Week

More information

COSC 2206 Internet Tools. CSS Cascading Style Sheets

COSC 2206 Internet Tools. CSS Cascading Style Sheets COSC 2206 Internet Tools CSS Cascading Style Sheets 1 W3C CSS Reference The official reference is here www.w3.org/style/css/ 2 W3C CSS Validator You can upload a CSS file and the validator will check it

More information

Teach Yourself HTML5 & CSS 3: Week 5 Task 13 - Anchors Part 3

Teach Yourself HTML5 & CSS 3: Week 5 Task 13 - Anchors Part 3 http://www.gerrykruyer.com Teach Yourself HTML5 & CSS 3: Week 5 Task 13 - Anchors Part 3 In this task you will continue working on the website you have been working on for the last two weeks. This week

More information

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

Table of Contents Chapter 9. Working with Cascading Style Sheets ... 1 Table of Contents Chapter 9.... 1 Introduction... 1 Introducing Cascading Style Sheets... 2 Create CSS Styles... 2 Attribute Styles... 2 Style Types... 3 Creating a Web Page with a CSS Layout... 4 Create

More information

Wireframe :: tistory wireframe tistory.

Wireframe :: tistory wireframe tistory. Page 1 of 45 Wireframe :: tistory wireframe tistory Daum Tistory GO Home Location Tags Media Guestbook Admin 'XHTML+CSS' 7 1 2009/09/20 [ ] XHTML CSS - 6 (2) 2 2009/07/23 [ ] XHTML CSS - 5 (6) 3 2009/07/17

More information

Class 3 Page 1. Using DW tools to learn CSS. Intro to Web Design using Dreamweaver (VBUS 010) Instructor: Robert Lee

Class 3 Page 1. Using DW tools to learn CSS. Intro to Web Design using Dreamweaver (VBUS 010) Instructor: Robert Lee Class 3 Page 1 Using DW tools to learn CSS Dreaweaver provides a way for beginners to learn CSS. Here s how: After a page is set up, you might want to style the . Like setting up font-family, or

More information

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

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

More information

Chapter 2 CSS for Style

Chapter 2 CSS for Style Chapter 2 CSS for Style CSS, or Cascading Style Sheets, is a language used to define the presentation of a document written in mark up language, such as HTML. The main purpose of CSS is to separate the

More information

CSS Lecture 16 COMPSCI 111/111G SS 2018

CSS Lecture 16 COMPSCI 111/111G SS 2018 No CSS CSS Lecture 16 COMPSCI 111/111G SS 2018 Styles Astyle changes the way the HTML code is displayed Same page displayed using different styles Same page with a style sheet body font-family: sans-serif;

More information

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

Networks and Web for Health Informatics (HINF 6220) Tutorial 8 : CSS. 8 Oct 2015 Networks and Web for Health Informatics (HINF 6220) Tutorial 8 : CSS 8 Oct 2015 What is CSS? o CSS (Style Sheet) defines how HTML elements are formatted and displayed. o It helps you easily change an HTML

More information

CSC309 Winter Lecture 2. Larry Zhang

CSC309 Winter Lecture 2. Larry Zhang CSC309 Winter 2016 Lecture 2 Larry Zhang 1 Announcements Assignment 1 is out, due Jan 25, 10pm. Start Early! Work in groups of 2, make groups on MarkUs. Make sure you can login to MarkUs, if not let me

More information

Creating a CSS driven menu system Part 1

Creating a CSS driven menu system Part 1 Creating a CSS driven menu system Part 1 How many times do we see in forum pages the cry; I ve tried using Suckerfish, I ve started with Suckerfish and made some minor changes but can t get it to work.

More information