Admin. A2 due next Wed! Exercise 8 posted: should aim to finish part 1 of E8 by next Mon. so you can get help from TA s on Tues./Thurs.
|
|
- Anna Lawrence
- 6 years ago
- Views:
Transcription
1 Admin A2 due next Wed! Exercise 8 posted: should aim to finish part 1 of E8 by next Mon. so you can get help from TA s on Tues./Thurs. Please review on your own (next slides): Correction notes on Colour On transparency in Unit 5 Graphics Markup for Table Python: new concepts!
2 On colour code
3 Red Green Blue Examples: Decimal Brightest green? Dark green? Brightest blue? Dark red? Purple? Dark purple? Gray? Darker gray? A B C D E F Hexadecimal 0 F F % of 16 2/10*16 = 3.2 Closet is 3 3 rd value is % of 16 3/10*16 = 4.8 Closest is 5 5-th value is 4
4 Graphics: transparency
5 Transparency Transparency? - Ability for light to pass through a medium Opacity? - Amount of light absorbed by a medium High opacity Low transparency Three ways to handle transparency info: 1. Don t store at all 2. 1-bit for each pixel (on or off) 3. As an additional channel (8-bit for each pixel) Known as alpha channel Gives various levels of opacity GIF JPEG PNG Transparency 1-bit None 8-bit 5
6 Markup for tables
7 Creating tables Heading1 Heading 2 Heading 3 Item1 Data1 Data2 Item2 Data3 Data4 Item3 Data5 Data6 Elements for table: <table> <th> <td> <tr> table header table data table row May contain one or more of <td> <th> 7
8 Creating a simple table Reporting experimental results Substance examined Lemon juice Baking soda Orange juice Measured ph level header row 3 data rows each with 2 columns 8
9 Creating a simple table Example markup: Substance examined Lemon juice Baking soda Orange juice Measured ph level header row 3 data table rows each with 2 columns <table> </table> <tr> <!-- header row --> <th>substance examined</th> <th>measured ph</th> </tr> <tr> <! - data row --> <th>lemon juice</th> <td>2.4</td> </tr> <tr> <! - data row --> <th>baking soda</th> <td>8.4</td> </tr> <tr> <! - data row --> <th>orange juice</th> <td>3.5</td> </tr> 9
10 Creating a more complex table ph level header spans over 3 columns Substance header spans over 2 rows <th colspan="3">ph level</th> <th rowspan="2">substance</th> 10
11 Example markup/styling of a table <table > </table> <tr> <!-- Headers --> <th rowspan="2">substance</th> <th colspan="3">ph level</th> </tr> <tr> <!-- Subheadings --> <th>sample 1</th> <th>sample 2</th> <th>sample 3</th> </tr> <tr> <!-- First data row --> <td>lemon juice</td> <td>2.2</td> <td>2.4</td> <td>2.2</td> </tr> <tr> <!-- Second data row --> <td>baking soda</td> <td>8.4</td> <td>8.1</td> <td>8.2</td> </tr> <tr> <!-- Third data row --> <td>orange juice</td> <td>3.5</td> <td>2.9</td> <td>3.1</td> </tr> /* CSS below */ table { border: solid green 2pt ; font-size: 14pt; font-family: sans-serif; text-align: center; } tr { background-color: #9d9; color: green; padding: 1em; } th { width: 120px; background-color: green; color: white; } 11
12 Making tables more accessible <table > </table> <tr> <th rowspan="2" class="left">substance</th><th colspan="2">ph level</th></tr> <tr><th>measurement 1</th><th>Measurement 2</th></tr> <tr> <!-- First row --> <td>lemon juice</td> <td>2.4</td> <td>2.2</td> </tr> <tr> <!-- Second row --> <td>baking soda</td> <td>8.4</td> <td>8.1</td> </tr> <tr> <!-- Third row --> <td>orange juice</td> <td>3.5</td> <td>2.9</td> </tr> <caption>this is caption of table.</caption> 12
13 <table summary= Measured ph levels in samples collected for Experiment A. > <tr> <th rowspan="2" class="left">substance</th><th colspan="2">ph level</th></tr> <tr><th>measurement 1</th><th>Measurement 2</th></tr> <tr> <!-- First row --> <td>lemon juice</td> <td>2.4</td> <td>2.2</td> </table> Making tables more accessible </tr> <tr> <!-- Second row --> <td>baking soda</td> <td>8.4</td> <td>8.1</td> Add summary description </tr> <tr> <!-- Third row --> <td>orange juice</td> <td>3.5</td> <td>2.9</td> </tr> <caption>this is caption of table.</caption> 13
14 Making tables more accessible <table summary= Measured Ph levels in samples collected for Experiment A. > <tr> <th rowspan="2" class="left">substance</th><th colspan="2">ph level</th></tr> <tr><th>measurement 1</th><th>Measurement 2</th></tr> <tr> <!-- First row --> <td abbr= lemon >Lemon juice</td> <td>2.4</td> <td>2.2</td> </table> Add summary description </tr> <tr> <!-- Second row --> <td abbr= soda >Baking soda</td> <td>8.4</td> <td>8.1</td> Add short version of header contents </tr> <tr> <!-- Third row --> <td abbr= orange >Orange juice</td> <td>3.5</td> <td>2.9</td> </tr> <caption>this is caption of table.</caption> Tip: Making sense of a large table via listening can be very difficult. Try to simplify it first. 14
15 CMPT 165 Unit 7 Intro to Programming - Part 3 Nov 12 th, 2015
16 Key concepts & terms seen so far Fundamentals Developer Interface GUI Shell Program Statements Client/server Fetching a resource Dynamic HTML Programming essentials Variables Data Types Numeric Strings Booleans Assignment (shorthand) Operations/Operator Arithmetic Concatenation Overloaded symbols Functions Data Input/Output (I/O) Process Refining print statements Governing program flow Testing Conditions If-else, elif 16
17 Review: Defining your own functions Use the keyword def (define) & syntax: >>> def name_of_function(input1,input2): return input1+input2 Example 1: calculate the square of an input number >>> def sqr(x): return x*x >>> sqr(5) 25 Programmer s practice: square of number Know the syntax! Colon Indentation Example 2: temperature conversion: Celsius (C o ) to Fahrenheit degree (F o ) >>> def Celsius_to_Fahrenheit(x): y=x*9/5+32 return y >>> new_var=celsius_to_fahrenheit(5) >>> new_var 41 17
18 FYI: function as a black box >>> y=10 >>> def Celsius_to_Fahrenheit(x): y=x*9/5+32; return y >>> x=5; new_var=celsius_to_fahrenheit(x) 10 5 y x y = x*9/5+32; return y 41 y new_var 18
19 Variable scope The part of a program where a variable is used is known as scope of variables e.g. scope of y is limited to Celsius_to_Fahrenheit function Outside of this function, y is undefined until you instantiate (assign value to) it We say y=41 is local to the function 19
20 Defining and using functions Two ways. 1) In Python shell: >>> y=10 >>> def Celsius_to_Fahrenheit(x): y=x*9/5+32; return y >>> x=5; new_var=celsius_to_fahrenheit(x) 2) In IDLE Editor and run as script (e.g. temp_convert.py) def Celsius_to_Fahrenheit(x): y=x*9/5+32; return y y=10; x=5; new_var=celsius_to_fahrenheit(x) Again: Know the syntax! Colon Indentation 20
21 In-class Exercise: Reviewed Given this example: >>> def Celsius_to_Fahrenheit(x): return x*9/5+32 >>> new_var=celsius_to_fahrenheit(1) >>> new_var 25 isolate the variable Output Input y = x*9/ (y 32) = x*9/5 (y -32)*5/9 = x Input Output Your task: write code Fahrenheit Celsius >>> def Fahrenheit_to_Celsius(y): return (y-32)*5/9 Q: Which is input variable to your new function? 21
22 Defining and using functions Recall: statements are executed in order saved in script (entered in Shell) Functions must be defined before you can call it def Celsius_to_Fahrenheit(x): y=x*9/5+32; return y y=10; x=5; new_var=celsius_to_fahrenheit(x) 22
23 Defining and using functions Would this work? y=10; def Celsius_to_Fahrenheit(x): y=x*9/5+32; return y x=5; new_var=celsius_to_fahrenheit(x) def Celsius_to_Fahrenheit(x): y=x*9/5+32; return y y=10; x=5; new_var=celsius_to_fahrenheit(x) 23
24 Defining and using functions Would this work? y=10; def Celsius_to_Fahrenheit(x): y=x*9/5+32; return y x=5; new_var=celsius_to_fahrenheit(x) And would this work? x=5; new_var=celsius_to_fahrenheit(x) def Celsius_to_Fahrenheit(x): y=x*9/5+32; return y y=10; 24
25 Return or not? If you need to process data further, use return >>> def Celsius_to_Fahrenheit(x): return x*9/5+32 >>> new_var=celsius_to_fahrenheit(1) >>> new_var 33.8 >>> print("the converted temperature is: "+new_var) The converted temperature is 33.8 Allows you to keep the data in memory
26 In-class Exercise: Refined >>> def Celsius_to_Fahrenheit(x): print(x*9/5+32) >>> Celsius_to_Fahrenheit(1) 33.8 Hard to understand output Better output: >>> Celsius_to_Fahrenheit(1) 1 Celsius = 33.8 Fahrenheit How could you code that? Ans: concatenating integers & strings >>> def Celsius_to_Fahrenheit(x): print(x, 'Celsius =', x*9/5+32, 'Fahrenheit' ) Numeric data String Numeric data String 26
27 Summary of key concepts & terms Fundamentals Developer Interface GUI Shell Program Statements Client/server Fetching a resource Dynamic HTML Programming essentials Variables Data Types Numeric Strings Assignment (shorthand) Operations/Operator Arithmetic Concatenation Overloaded symbols Functions Data Input/Output (I/O) Process Refining print statements Governing program flow Testing Conditions If-else, elif 27
28 Commenting in Python Problem: Programs become large/complex Solutions: Debugging: process of diagnosing problems in your code Add comments to explain your code A good programming practice Q: How to add comments in HTML? <!-- ignored --> Q: how about in CSS? /* ignored */ # single line comment var1=10; var2=var1+3; """this is a multiline comment so any thing in between is ignored """ var2*=var1; 28 Strings that are not assigned to a variable become comments
29 Program flow Idea: If something_happens, Do task1; Else, Do task2; Concrete example (in web programming, governs/facilitates userinteraction), e.g.: If (your_visitor_chooses_to_buy_coffee), print ( the_cost_of_coffee_to_screen ) Otherwise print ( "Thank you for visiting ) We ll see how we can get user input next class 29
30 Testing conditions Build complex programs by executing particular statements depending on test conditions Example test conditions: Numerical and string comparisons: Examples: equal (==), less than (<), greater than (>) >>> y=10; x=5 >>> x > y False >>> x > 1 True >>> x == 5 True >>> x == 15 False 30 >>> x >= 5 True >>> y=20; x=12 >>> x > y*2 False >>> x=1; x <= 1 True >>> str='c'; str == 'c' True
31 If-else Execute particular statements depending on condition Syntax: if (condition_1): else: Example: # do something # do something else def compare_numbers(x,y): if (x > y): print( x,'greater than', y); else: print( x,'less than', y); 31
32 - More than 2 conditions to test? If, else-if, else - Syntax: if (condition_1): # do something elif (conditon_2): # do something else else: # do default tasks - Example: def compare_numbers(x,y): if (x > y): print( x,'greater than',y); elif (x==y): print( x, 'equal to',y) else: print( x,'less 32 than',y)
33 If, else-if, else Execute particular statements depending on condition Syntax: if (condition_1): # do something elif (conditon_2): # do something else elif (conditon_3): else: # do yet something else # do default tasks 33
34 Q) Given example conversion: Practice #1 >>> def Celsius_to_Fahrenheit(x): print( x*9/5+32 ) >>> Celsius_to_Fahrenheit(1) 33.8 Write a function that takes 2 inputs: Temp_conversion(x,str) And print output accordingly, like this: >>> Temp_conversion(1, 'c') 1 Celsius = 33.8 Fahrenheit >>> Temp_conversion(25, 'f') 33.8 Fahrenheit = 1 Celsius 34
35 Solution to Practice#1 def Temp_conversion(x,str): if (str=='c'): print( x,'celsius =',x*9/5+32,'fahrenheit') else: print( x,'fahrenheit =',(x-32)*5/9, 'Celsius') def Temp_conversion(x,str): if (str=='c'): print( x,'celsius =',x*9/5+32,'fahrenheit') elif (str=='c'): print( x,'celsius =',x*9/5+32,'fahrenheit') else: print( x,'fahrenheit =',(x-32)*5/9, 'Celsius') 35
36 Practice #2 Q1) Write a function my_max that returns the maximum of 3 input numbers. >>> my_max(1,12,5) 12 >>> my_max(11,5,4) 11 def my_max(num1, num2, num3): Q2) Write a function my_min that returns the minimum of 3 input numbers.? 36
37 One simple solution to Practice #2 def my_max(num1, num2, num3): if num1 > num2: if num1 > num3: return num1 else: return num3 else: if num2 > num3: return num2 else: return num3;
38 About the Extra Activity
39 39
40 FYI, error codes explained: 40
41 How to resolve this? MIME type Specify MIME type in the output of your Python scripts 41
42 MIME type How to resolve this? Specify MIME type in the output of your Python scripts Do so by adding this print statement: MIME type print("content-type: text/html") print( ) Prints blank line. This line is required! print( 'I am a Python program helping... ') print( '...to finish an exercise for "CMPT 165".') print( 5012* ) 42
43 Dynamic markup from Python scripts Example from Fig. 7.2 of Study Guide str= "Content-type: text/html print( str ) print( ) Print( "<html><head>" ) Print( "<title>python did this</title>" ) Print( "</head><body>" ) Print( "<p>here I am</p>" ) Print( "</body></html>" ) 43
44 Summary of key concepts & terms Fundamentals Developer Interface GUI Shell Program Statements Client/server Fetching a resource Dynamic HTML MIME Programming essentials Variables Data Types Numeric Strings Booleans Assignment (shorthand) Operations/Operator Arithmetic Concatenation Overloaded symbols Functions Data Input/Output (I/O) Process Refining print statements Governing program flow Testing Conditions If-else, elif 44
45 Fetching a resource: reviewed Client-side Server-side 45
46 User, User-agent, Server: revisited Enter URL address bar: 1) Enters URL User (visitor) User agent (browser) 14) Hovers over anchors Client-side interaction : :hover, :active title attribute tooltip 2) Requests for demo.html 7) Requests for style.css 4) Sends demo.html 9) Sends style.css 5) Parses/renders markup in demo.html on screen 6) Sees <link> for style.css 10) Renders markup in demo.html on screen 15) Renders tooltips, etc. 46 Server e.g. cmpt165.csil.sfu.ca 3) Looks up demo.html 8) Looks up style.css
47 User, User-agent, Server: revisited Enter URL address bar: 1) Enters URL User (visitor) User agent (browser) i) Requests for first.py iii) Sends output 5) Parses/renders markup in generated output on screen Server e.g. cmpt165.csil.sfu.ca ii) Runs first.py (+ generates output) 47
48 User, User-agent, Server: revisited Enter URL address bar: 1) Enters URL User (visitor) User agent (browser) 14) Moves mouse Client-side Server-side 4) Sends demo.html 9) Sends style.css iii) Sends output 5) Parses/renders markup in demo.html on screen 6) Sees <link> for style.css 10) Renders markup in demo.html on screen 15) Renders tooltips, etc. 2) Requests for demo.html 3) Looks up demo.html 7) Requests for style.css 8) Looks up style.css i) Requests for first.py Server e.g. cmpt165.csil.sfu.ca 48 ii) Runs first.py (+ generates output)
49 User, User-agent, Server: revisited Enter URL address bar: 1) Enters URL User (visitor) User agent (browser) 14) Moves mouse Client-side Server-side 4) Sends demo.html 9) Sends style.css iii) Sends output 5) Parses/renders markup in demo.html on screen 6) Sees <link> for style.css 10) Renders markup in demo.html on screen 15) Renders tooltips, etc. 2) Requests for demo.html 3) Looks up demo.html 7) Requests for style.css 8) Looks up style.css i) Requests for first.py Server e.g. cmpt165.csil.sfu.ca 49 ii) Runs first.py (+ generates output)
50 Static vs. dynamic resource *.html *.htm *.pdf *.txt *.svg *.jpg *.mp3 * : Asterisk sign ( little star, star symbol) In O/S, symbolizes wildcard = anything *.html means anything ending with.html These are known as static resource: one that already exists on webserver *.py, *.php, *.js Web server recognizes these as programs (i.e. web scripts ) use corresponding software to process these scripts and output the content generated by these scripts Resource generated upon request known as dynamic resource, one created on-the-fly 50
51 Key concepts & terms seen so far Fundamentals Developer Interface GUI Shell Program Statements Client/server Fetching a resource Dynamic HTML Programming essentials Variables Data Types Numeric Strings Booleans Assignment (shorthand) Operations/Operator Arithmetic Concatenation Overloaded symbols 51 Functions Data Input/Output (I/O) Process Refining print statements Governing program flow Testing Conditions If-else, elif Misc. Commenting: # ignored " " " ignored " " "
CMPT 165 Unit 7 Intro to Programming - Part 5. Nov 20 th, 2015
CMPT 165 Unit 7 Intro to Programming - Part 5 Nov 20 th, 2015 Admin A2: Google form for contest submission Eager to know about A3??? Additional office hours to study for midterm#2 today? My office location
More informationAdmin. 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 information3.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
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 informationAssignments (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 informationICT IGCSE Practical Revision Presentation Web Authoring
21.1 Web Development Layers 21.2 Create a Web Page Chapter 21: 21.3 Use Stylesheets 21.4 Test and Publish a Website Web Development Layers Presentation Layer Content layer: Behaviour layer Chapter 21:
More informationAdding 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 informationLab 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 informationICT IGCSE Practical Revision Presentation Web Authoring
21.1 Web Development Layers 21.2 Create a Web Page Chapter 21: 21.3 Use Stylesheets 21.4 Test and Publish a Website Web Development Layers Presentation Layer Content layer: Behaviour layer Chapter 21:
More informationIntroduction 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 informationWelcome 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- 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 informationPerfect Student Midterm Exam March 20, 2007 Student ID: 9999 Exam: 7434 CS-081/Vickery Page 1 of 5
Perfect Student Midterm Exam March 20, 2007 Student ID: 9999 Exam: 7434 CS-081/Vickery Page 1 of 5 NOTE: It is my policy to give a failing grade in the course to any student who either gives or receives
More informationCSS: 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 informationStyle Sheet Reference Guide
Version 8 Style Sheet Reference Guide For Password Center Portals 2301 Armstrong St, Suite 2111, Livermore CA, 94551 Tel: 925.371.3000 Fax: 925.371.3001 http://www.imanami.com This publication applies
More informationHtml basics Course Outline
Html basics Course Outline Description Learn the essential skills you will need to create your web pages with HTML. Topics include: adding text any hyperlinks, images and backgrounds, lists, tables, and
More informationLinks Menu (Blogroll) Contents: Links Widget
45 Links Menu (Blogroll) Contents: Links Widget As bloggers we link to our friends, interesting stories, and popular web sites. Links make the Internet what it is. Without them it would be very hard to
More informationCSC 121 Computers and Scientific Thinking
CSC 121 Computers and Scientific Thinking Fall 2005 HTML and Web Pages 1 HTML & Web Pages recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language
More informationCOMP519: Web Programming Lecture 4: HTML (Part 3)
COMP519: Web Programming Lecture 4: HTML (Part 3) Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool Contents 1 HTML
More informationCS193X: Web Programming Fundamentals
CS193X: Web Programming Fundamentals Spring 2017 Victoria Kirst (vrk@stanford.edu) Today's schedule Today: - Wrap up box model - Debugging with Chrome Inspector - Case study: Squarespace Layout - Flex
More informationUsing 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 informationFRONTPAGE STEP BY STEP GUIDE
IGCSE ICT SECTION 15 WEB AUTHORING FRONTPAGE STEP BY STEP GUIDE Mark Nicholls ICT lounge P a g e 1 Contents Introduction to this unit.... Page 4 How to open FrontPage..... Page 4 The FrontPage Menu Bar...Page
More informationSession 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 information2. 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 informationCSS 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 informationWeek 13 Thursday (with Page 5 corrections)
Week 13 Thursday (with Page 5 corrections) Quizzes: HTML/CSS and JS available and due before 10 pm next Tuesday, May 1 st. You may do your own web research to answer, but do not ask classmates, friends,
More informationReading 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 informationrecall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML)
HTML & Web Pages recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML) HTML specifies formatting within a page using tags in its
More informationThe Benefits of CSS. Less work: Change look of the whole site with one edit
11 INTRODUCING CSS OVERVIEW The benefits of CSS Inheritance Understanding document structure Writing style rules Attaching styles to the HTML document The cascade The box model CSS units of measurement
More informationCreating HTML files using Notepad
Reference Materials 3.1 Creating HTML files using Notepad Inside notepad, select the file menu, and then Save As. This will allow you to set the file name, as well as the type of file. Next, select the
More informationCOPYRIGHTED MATERIAL. Contents. Chapter 1: Creating Structured Documents 1
59313ftoc.qxd:WroxPro 3/22/08 2:31 PM Page xi Introduction xxiii Chapter 1: Creating Structured Documents 1 A Web of Structured Documents 1 Introducing XHTML 2 Core Elements and Attributes 9 The
More informationSession 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 informationUsing 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 informationAppendix 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 informationTables & Lists. Organized Data. R. Scott Granneman. Jans Carton
Tables & Lists Organized Data R. Scott Granneman Jans Carton 1.3 2014 R. Scott Granneman Last updated 2015-11-04 You are free to use this work, with certain restrictions. For full licensing information,
More informationCMPT 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 informationBefore you begin, make sure you have the images for these exercises saved in the location where you intend to create the Nuklear Family Website.
9 Now it s time to challenge the serious web developers among you. In this section we will create a website that will bring together skills learned in all of the previous exercises. In many sections, rather
More informationWebsite Development with HTML5, CSS and Bootstrap
Contact Us 978.250.4983 Website Development with HTML5, CSS and Bootstrap Duration: 28 hours Prerequisites: Basic personal computer skills and basic Internet knowledge. Course Description: This hands on
More informationLING 408/508: Computational Techniques for Linguists. Lecture 14
LING 408/508: Computational Techniques for Linguists Lecture 14 Administrivia Homework 5 has been graded Last Time: Browsers are powerful Who that John knows does he not like? html + javascript + SVG Client-side
More informationCascading Style Sheets. Overview and Basic use of CSS
Cascading Style Sheets Overview and Basic use of CSS What are Style Sheets? A World Wide Web Consortium (W3C) defined standard A way for web page designers to separate the formatting of a document from
More informationDAY 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<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 information8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2) Horizontal Rule Element
Web Development & Design Foundations with HTML5 Ninth Edition Chapter 4 Visual Elements and Graphics Learning Objectives (1 of 2) 4.1 Create and format lines and borders on web pages 4.2 Apply the image
More informationWanted! Introduction. Step 1: Styling your poster. Activity Checklist. In this project, you ll learn how to make your own poster.
Wanted! Introduction In this project, you ll learn how to make your own poster. Step 1: Styling your poster Let s start by editing the CSS code for the poster. Activity Checklist Open this trinket: jumpto.cc/web-wanted.
More informationIndian Institute of Technology Kharagpur. HTML Part III. Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. I.I.T.
Indian Institute of Technology Kharagpur HTML Part III Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. I.I.T. Kharagpur, INDIA Lecture 15: HTML Part III On completion, the student will be able
More informationc122sep2214.notebook September 22, 2014
This is using the border attribute next we will look at doing the same thing with CSS. 1 Validating the page we just saw. 2 This is a warning that recommends I use CSS. 3 This caused a warning. 4 Now I
More informationINFS 2150 / 7150 Intro to Web Development / HTML Programming
XP Objectives INFS 2150 / 7150 Intro to Web Development / HTML Programming Designing a Web Page with Tables Create a text table Create a table using the , , and tags Create table headers
More informationUsing CSS in Web Site Design
Question 1: What are some of the main CSS commands I should memorize? Answer 1: The most important part of understanding the CSS language is learning the basic structure and syntax so you can use the language
More informationCOMSC-030 Web Site Development- Part 1. Part-Time Instructor: Joenil Mistal
COMSC-030 Web Site Development- Part 1 Part-Time Instructor: Joenil Mistal Chapter 9 9 Working with Tables Are you looking for a method to organize data on a page? Need a way to control our page layout?
More informationA Balanced Introduction to Computer Science, 3/E
A Balanced Introduction to Computer Science, 3/E David Reed, Creighton University 2011 Pearson Prentice Hall ISBN 978-0-13-216675-1 Chapter 2 HTML and Web Pages 1 HTML & Web Pages recall: a Web page is
More informationCSc 337 LECTURE 3: CSS
CSc 337 LECTURE 3: CSS The bad way to produce styles welcome to Greasy Joe's. You will never, ever, ever beat our
More informationStudy 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 informationCSS. 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 informationIntroduction to the MODx Manager
Introduction to the MODx Manager To login to your site's Manager: Go to your school s website, then add /manager/ ex. http://alamosa.k12.co.us/school/manager/ Enter your username and password, then click
More informationCSS. 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 informationChapter 3 Style Sheets: CSS
WEB TECHNOLOGIES A COMPUTER SCIENCE PERSPECTIVE JEFFREY C. JACKSON Chapter 3 Style Sheets: CSS 1 Motivation HTML markup can be used to represent Semantics: h1 means that an element is a top-level heading
More informationID1354 Internet Applications
ID1354 Internet Applications CSS Leif Lindbäck, Nima Dokoohaki leifl@kth.se, nimad@kth.se SCS/ICT/KTH What is CSS? - Cascading Style Sheets, CSS provide the means to control and change presentation of
More informationFlow Control: Branches and loops
Flow Control: Branches and loops In this context flow control refers to controlling the flow of the execution of your program that is, which instructions will get carried out and in what order. In the
More informationCS7026 CSS3. CSS3 Graphics Effects
CS7026 CSS3 CSS3 Graphics Effects What You ll Learn We ll create the appearance of speech bubbles without using any images, just these pieces of pure CSS: The word-wrap property to contain overflowing
More informationWelcome. Web Authoring: HTML - Advanced Topics & Photo Optimisation (Level 3) Richard Hey & Barny Baggs
Welcome Web Authoring: HTML - Advanced Topics & Photo Optimisation (Level 3) Richard Hey & Barny Baggs Health and Safety Course Information General Information Objectives To understand the need for photo
More informationStudent, Perfect CS-081 Final Exam May 21, 2010 Student ID: 9999 Exam ID: 3122 Page 1 of 6 Instructions:
Student ID: 9999 Exam ID: 3122 Page 1 of 6 Instructions: Use pencil. Answer all questions: there is no penalty for guessing. Unless otherwise directed, circle the letter of the one best answer for multiplechoice
More informationBIM222 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 informationCSS 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 informationPIC 40A. Midterm 1 Review
PIC 40A Midterm 1 Review XHTML and HTML5 Know the structure of an XHTML/HTML5 document (head, body) and what goes in each section. Understand meta tags and be able to give an example of a meta tags. Know
More informationHTML and CSS a further introduction
HTML and CSS a further introduction By now you should be familiar with HTML and CSS and what they are, HTML dictates the structure of a page, CSS dictates how it looks. This tutorial will teach you a few
More informationCMPT 165: More CSS Basics
CMPT 165: More CSS Basics Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University October 14, 2011 1 The Favorites Icon The favorites icon (favicon) is the small icon you see
More informationIndex. 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 informationCS 350 COMPUTER/HUMAN INTERACTION. Lecture 6
CS 350 COMPUTER/HUMAN INTERACTION Lecture 6 Setting up PPP webpage Log into lab Linux client or into csserver directly Webspace (www_home) should be set up Change directory for CS 350 assignments cp r
More informationCascading 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 informationMYGOV.SCOT ASSETS. Design Guide for Developers
MYGOV.SCOT ASSETS Design Guide for Developers Contents Click on the options below for further information: Typography The mygov.scot font is Roboto, this is an open source, licence free font which can
More informationTitle and Modify Page Properties
Dreamweaver After cropping out all of the pieces from Photoshop we are ready to begin putting the pieces back together in Dreamweaver. If we were to layout all of the pieces on a table we would have graphics
More information[CHAPTER] 1 INTRODUCTION 1
FM_TOC C7817 47493 1/28/11 9:29 AM Page iii Table of Contents [CHAPTER] 1 INTRODUCTION 1 1.1 Two Fundamental Ideas of Computer Science: Algorithms and Information Processing...2 1.1.1 Algorithms...2 1.1.2
More information- 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 informationIntroduction to Python (All the Basic Stuff)
Introduction to Python (All the Basic Stuff) 1 Learning Objectives Python program development Command line, IDEs, file editing Language fundamentals Types & variables Expressions I/O Control flow Functions
More informationCSS 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 informationProgramming. We will be introducing various new elements of Python and using them to solve increasingly interesting and complex problems.
Plan for the rest of the semester: Programming We will be introducing various new elements of Python and using them to solve increasingly interesting and complex problems. We saw earlier that computers
More information1 of 7 11/12/2009 9:29 AM
1 of 7 11/12/2009 9:29 AM Home Beginner Tutorials First Website Guide HTML Tutorial CSS Tutorial XML Tutorial Web Host Guide SQL Tutorial Advanced Tutorials Javascript Tutorial PHP Tutorial MySQL Tutorial
More informationTable of Contents. MySource Matrix Content Types Manual
Table of Contents Chapter 1 Introduction... 5 Chapter 2 WYSIWYG Editor... 6 Replace Text... 6 Select Snippet Keyword... 7 Insert Table and Table Properties... 8 Editing the Table...10 Editing a Cell...12
More informationHTML 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 informationChapter 4 Notes. Creating Tables in a Website
Chapter 4 Notes Creating Tables in a Website Project for Chapter 4 Statewide Realty Web Site Chapter Objectives Define table elements Describe the steps used to plan, design, and code a table Create a
More informationGetting Started with Python
Fundamentals of Programming (Python) Getting Started with Python Sina Sajadmanesh Sharif University of Technology Some slides have been adapted from Python Programming: An Introduction to Computer Science
More information3.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 informationIntro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming
Intro to Programming Unit 7 Intro to Programming 1 What is Programming? 1. Programming Languages 2. Markup vs. Programming 1. Introduction 2. Print Statement 3. Strings 4. Types and Values 5. Math Externals
More informationGoSquared Equally Rounded Corners Equally Rounded Corners -webkit-border-radius -moz-border-radius border-radius Box Shadow Box Shadow -webkit-box-shadow x-offset, y-offset, blur, color Webkit Firefox
More informationA HTML document has two sections 1) HEAD section and 2) BODY section A HTML file is saved with.html or.htm extension
HTML Website is a collection of web pages on a particular topic, or of a organization, individual, etc. It is stored on a computer on Internet called Web Server, WWW stands for World Wide Web, also called
More informationCSE 154 LECTURE 3: MORE CSS
CSE 154 LECTURE 3: MORE CSS Cascading Style Sheets (CSS): ... ... HTML CSS describes the appearance and layout of information
More informationDreamweaver CS3 Lab 2
Dreamweaver CS3 Lab 2 Using an External Style Sheet in Dreamweaver Creating the site definition First, we'll set up the site and define it so that Dreamweaver understands the site structure for your project.
More informationClient-Side Web Technologies. CSS Part I
Client-Side Web Technologies CSS Part I Topics Style declarations Style sources Selectors Selector specificity The cascade and inheritance Values and units CSS Cascading Style Sheets CSS specifies the
More informationRich Text Editor Quick Reference
Rich Text Editor Quick Reference Introduction Using the rich text editor is similar to using a word processing application such as Microsoft Word. After data is typed into the editing area it can be formatted
More informationCreating 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 informationCSS مفاهیم ساختار و اصول استفاده و به کارگیری
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 information8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2)
Web Development & Design Foundations with HTML5 Ninth Edition Chapter 3 Configuring Color and Text with CSS Slides in this presentation contain hyperlinks. JAWS users should be able to get a list of links
More informationCSS worksheet. JMC 105 Drake University
CSS worksheet JMC 105 Drake University 1. Download the css-site.zip file from the class blog and expand the files. You ll notice that you have an images folder with three images inside and an index.html
More informationDeccansoft 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 informationAdding Text and Images. IMCOM Enterprise Web CMS Tutorial 1 Version 2
Adding Text and Images IMCOM Enterprise Web CMS Tutorial 1 Version 2 Contents and general instructions PAGE: 3. First steps: Open a page and a block to edit 4. Edit text / The menu bar 5. Link to sites,
More informationVariable and Data Type I
The Islamic University of Gaza Faculty of Engineering Dept. of Computer Engineering Intro. To Computers (LNGG 1003) Lab 2 Variable and Data Type I Eng. Ibraheem Lubbad February 18, 2017 Variable is reserved
More informationChapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21
Table of Contents Chapter 1 Getting Started with HTML 5 1 Introduction to HTML 5... 2 New API... 2 New Structure... 3 New Markup Elements and Attributes... 3 New Form Elements and Attributes... 4 Geolocation...
More informationCOMP519 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 informationCSS Design and Layout Basic Exercise instructions. Today's exercises. Part 1: Arrange Page into Sections. Part 1, details (screenshot below)
CSS Design and Layout Basic Exercise instructions You may want to bring your textbook to Exercises to look up syntax and examples. Have a question? Ask for help, or look at the book or lecture slides.
More informationCOMM 2555 Interactive Digital Communication LAB 4
COMM 2555 Interactive Digital Communication LAB 4 The goal of this lab is to practice HTML, especially lists and tables, and to continue exploring CSS. You will start with a blank HTML web page page and
More information