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

Similar documents
what is an algorithm? analysis of algorithms classic algorithm example: search

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

Reading 2.2 Cascading Style Sheets

CSS. Lecture 16 COMPSCI 111/111G SS 2018

Controlling Appearance the Old Way

Lecture C1 Data Representation. Computing and Art : Nature, Power, and Limits CC 3.12: Fall 2007

CSS Lecture 16 COMPSCI 111/111G SS 2018

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

Introduction to Web Design CSS Reference

Introduction to Web Design CSS Reference

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

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

Appendix D CSS Properties and Values

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

DAY 4. Coding External Style Sheets

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

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

Lab 4 CSS CISC1600, Spring 2012

Cascading Style Sheets (CSS)

HTML/XML. HTML Continued Introduction to CSS

CSS for Styling CS380

In the early days of the Web, designers just had the original 91 HTML tags to work with.

Cascade Stylesheets (CSS)

Introduction to Cascading Style Sheets

Creating and Building Websites

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

Basic Web Pages with XHTML (and a bit of CSS) CSE 190 M (Web Programming), Spring 2008 University of Washington Reading: Chapter 1, sections

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

- 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

CSS: The Basics CISC 282 September 20, 2014

CSS: formatting webpages

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

Lab Introduction to Cascading Style Sheets

CSC 443: Web Programming

CSS Cascading Style Sheets

Introduction to Web Tech and Programming

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

Introduction to using HTML to design webpages

CSS cont. October 5, Unit 4

Introduction to WEB PROGRAMMING

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

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

ID1354 Internet Applications

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

ICT IGCSE Practical Revision Presentation Web Authoring

Styles, Style Sheets, the Box Model and Liquid Layout

How to create and edit a CSS rule

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

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

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

CSS Styles Quick Reference Guide

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

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

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

Lesson 5 Introduction to Cascading Style Sheets

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

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

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

Web Site Design and Development Lecture 5

CSS.

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

WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5

Title: Jan 29 11:03 AM (1 of 23) Note that I have now added color and some alignment to the middle and to the right on this example.

COSC 2206 Internet Tools. CSS Cascading Style Sheets

Assignments (4) Assessment as per Schedule (2)

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

Chapter 3 Style Sheets: CSS

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

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

Using Dreamweaver CS6

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Web Development & Design Foundations with HTML5

CSS: Cascading Style Sheets

Fundamentals of Web Programming a

Web Development & Design Foundations with HTML5

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

How to lay out a web page with CSS

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

ITNP43: HTML Lecture 4

INFORMATICA GENERALE 2014/2015 LINGUAGGI DI MARKUP CSS

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

CSS: Cascading Style Sheets

Cascading Style Sheets. Overview and Basic use of CSS

Cascading Style Sheet Quick Reference

WEB DESIGN: CONSTRUCTION, FILES, CODE AND COLOURS UNIT NUMBER: H383 34

CSC 337. Cascading Style Sheets. Marty Stepp, Rick Mercer

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

CHAPTER 4 CASCADING STYLE SHEETS BASICS KEY CONCEPTS

1 Creating a simple HTML page

Methods for configuring Cascading Style Sheets. Applying style to element name selectors. Style Rule Basics. CMPT 165: Cascading Style Sheets

CISC1600-SummerII2012-Raphael-lec3 1

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

Three Ways to Use CSS:

Activity 4.1: Creating a new Cascading Style Sheet

CSc 337 LECTURE 3: CSS

HTMLnotesS15.notebook. January 25, 2015

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

Creating and Building Websites

CMPT 165 Advanced XHTML & CSS Part 3

Transcription:

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

Functionalia Instructor Chipp Jansen, chipp@sci.brooklyn.cuny.edu Course Web Page http://www.sci.brooklyn.cuny.edu/~chipp/cc3.12/ HW B (Both Parts 1 and 2) DUE Wednesday Oct. 3, 11:59 pm

Office Hours Extra Help My Office Hours : Mondays 12:30 to 1:30 - basement Ingersoll 0317N Bridges Student Resource Center : 0317N Monday 1:30 to 5pm Tuesday 1:30 to 3:30 Wednesday 1:30 to 3:30 Thursday 12:45-1:45, 2:15-3:15

Functionalia Today: HTML Review Style Sheets Algorithmic Thinking

HTML Review Questions about the Lab 1 - and what to do? tags - paragraph, header, bold, etc... lists links images What are comments?

HTML Review Questions about the Lab 1 - and what to do? What are comments? Comments are notes to yourself and others. They are ignored by the web-browser, and they are not visible on the page. How do you write comments in HTML? <!-- This is a comment -->

Style Sheets CSS = Cascading Style Sheets Allows you to control the look-and-feel for your webpages. - Font of Text - Color of Text - Exact Layout of elements.

Two ways: Adding Style to your Page 1. Embedded - use a style tag and put the style rules in the head tag <style type="text/css"> body { color: black; background: white; } </style> ex17.html 2. Linked - create a separate text file that contains the style rules and link to it. <link type="text/css" rel="stylesheet" href="style.css"> and the text file contains the style rules (no style tag) : body { color: black; background: white; } ex18.html

Style Rules body { color: black; background: white; } SAME AS: body { color: black; background: white; }

Style Rules body { color: white; background: black; } rules are written right after each other p { } color: yellow; ex19.html

Style Rules body { color: white; background: black; } names of the tags that are selected by that rule p { } color: yellow;

Use curly-braces to enclose style specifcation body { color: white; background: black; } opening curly-brace closing curly-brace p { } color: yellow;

Attributes and their values are given body { color: white; background: black; } attribute name attribute value p { } color: yellow;

Add Margins - left/right/top/bottom body { margin-left: 10%; margin-right: 10%; } h1 { margin-left: -8%;} h2,h3,h4,h5,h6 { margin-left: -4%; } p { text-indent: 2em; margin-top: 0; ex20.html ex21.html margin-bottom: 0; }

em { font-style: italic; Font Styles bold bolder lighter font-weight: bold; } strong { text-transform: uppercase; uppercase lowercase font-weight: bold; } ex22.html

Font Styles body { font-family: Verdana, sans-serif; } Garamond Times New Roman ex23.html

Divisions Divisions (div) allow for styling blocks of HTML. borders colors naming (class) different divisions div.box { border: solid; border-width: thin; width: 100%; } ex24.html

Unvisited Links Links :link { color: green; } Visited Links :visited { color: purple; } When a Link is clicked a:active { color: red; } When the mouse hovers over the link a:hover { color: blue; } ex25.html

Colors there are some named colors (black, silver, gray, white, maroon, red, purple, magenta, green, lime, olive, yellow, navy, blue, teal, aqua,...) all colors have a six-digit hexadecimal definition: 2 digits each for Red, Green and Blue RGB color table browser safe or web safe colors accommodate older systems that only show up to 256 colors (at one time), so each RGB can only be one of the following: 00, 33, 66, 99, C C, F F (in hex) ColorNames Link

body tag: no style sheet - style the OLD way! <body bgcolor="white" text="black" link="navy" vlink="maroon" alink="red"> where link for unvisited links, vlink for visited links, alink for the color when you click on the link (before you release the mouse) font tag: <font face="sans-serif" color="red" size="5">... </font> ex26.html

what is an algorithm? a step-by-step sequence of instructions for carrying out some task examples of algorithms outside of computing: cooking recipes dance steps proofs (mathematical or logical) solutions to mathematical problems in computing, algorithms are synonymous with problem solving

How to Solve It, by George Polya 1. understand the problem 2. devise a plan 3. carry out your plan 4. examine the solution example: find the oldest person in the class (besides me)

Analysis of Algorithms often, there is more than one way to solve a problem, i.e., there exists more than one algorithm for addressing any task some algorithms are better than others which features of the algorithm are important? speed (number of steps) memory (size of work space; how much scrap paper do you need?) complexity (can others understand it?) parallelism (can you do more than one step at once?)

Big-Oh Big-Oh notation O(N ) means solution time is proportional to the size of the problem (N) O(log2 N) means solution time is proportional to log2 N see examples in Reed page 142

Classic Algorithm: Search sequential search binary search search the Manhattan phone book for Al Pacino : how many comparisons do you have to make in order to find the entry you are looking for? equality versus relativity which will tell you more? which will help you solve the problem more efficiently? can you take advantage of the fact that the phone book is in sorted order? (i.e., an ordered list ) what would happen to your algorithm if the phone book were in random order?

Algorithms and Programming programming languages provide a level of abstraction that is more understandable to humans than binary machine language (0 s and 1 s) assembly languages (in the early 1950 s) provided abbreviations for machine language instructions (like MOV, ADD, S TO) high-level languages (introduced in the late 1950 s) provided more programmer- friendly ways for humans to write computer code (e.g., FORTRAN, LISP)

Machine Language

Assembly Language

C++ Example #include <iostream.h> main() { cout << "Hello World!"; return 0; }

JavaScript <html> <body> <script language=javascript> //says the language is javascript document.write("hello World!"); //prints Hello World! //stop JavaScript Code </script> </body> </html>

Program Translation - translates assembly or high-level languages into binary machine language - two methods: interpretation: reads and translates statements one at a time; doesn t optimize across an entire program; doesn t store executable statements just runs them; error checking only happens at run time, run time can be slow, but there s no compile time compilation: reads and translates entire program, and stores result as an executable file; can optimize; can perform compile time error checking; run-time is fast, but there is compile time

Compile-time vs. Compile Time compile-time (noun): the process of compiling a program from an assembly or high-level language into binary machine language and storing it on the computer s hard disk compile time (adj noun): the amount of time it takes a compiler to translate (or compile ) a program

Run-time vs. Run Time run-time (noun): the process of executing a compiled, stored program run time (adj noun): the amount of time it takes a program to run this is where Big-Oh comes in

Errors errors: can be found at compile-time and at run-time error checking : is done at compile-time

TO DO Homework B (part 1 and 2) - part 2 will be given in Lab on Thursday. READ: Reed, Chapter 8