JavaScript Professor Robin Burke. 2 Outline Quiz Tables JavaScript.

Slides:



Advertisements
Similar presentations
Table, List, Blocks, Inline Style
Advertisements

Use Tables for Layout Control Day 7. You will learn to: Understand Tables Create a Simple Table Modify Your Tables Appearance Create Page Layouts with.
Tutorial 5 Working with Web Tables
HTML/XML XHTML Authoring. Creating Tables  Table: An arrangement of horizontal rows and vertical columns. The intersection of a row and a column is called.
Creating Tables Text Tables -created by using preformatted tags. Graphical Tables - created using Table Structure with HTML.
Chapter 4 – Intermediate HTML 4 Outline 4.1 Unordered Lists 4.2 Nested and Ordered Lists 4.3 Basic HTML Tables 4.4 Intermediate HTML Tables and Formatting.
Tutorial 4: Designing a Web Page with Tables
XHTML1 Tables and Lists. XHTML2 Objectives In this chapter, you will: Create basic tables Structure tables Format tables Create lists.
Unit 2, cont. September 14 HTML,Validating your pages, Publishing your site.
Creating a Web Page with Tables. Objectives Create a text table with preformatted text Create the basic structure of a graphical table Organize table.
Introducing Web Tables
Computing Concepts Advanced HTML: Tables and Forms.
XP Creating Web Pages with HTML Using Tables. XP Objectives Create a text table Create a table using the,, and tags Create table headers and captions.
Using HTML Tables.
The Power of Tables They aren't just for sitting stuff on anymore...
1 Tables: Data in Rows and Columns – What is Table? – How Tables are Used? – Designing Tables – Table, Cell, Row Attributes – Using Tables for Alignment.
AdvWeb-1/37 DePaul University SNL 262 Web Page Design Tables! - Chapt 15 Instructor: David A. Lash.
HTML. Creating a Table Attributes: border: indicates the border type of the table Value: 0 (no border), 1, 2, etc. cols: indicates the number of columns.
INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 06: Tables - Spring 2011.
HTML Essentials Tables and Table Tags. Overview Use of Tables goes beyond tabulating data Frequently used to format Web pages / control layout Especially.
Tables in HTML Basharat Mahmood, Department of Computer Science,CIIT,Islamabad, Pakistan. 1.
XP 1 Tutorial 4 Designing a Web Page with Tables.
XHTML1 Tables N100 Creating a Simple Web Page. XHTML2 Creating Basic Tables Tables are collections of rows and columns that you use to organize and display.
CIS 1315 – Web Development for Educators CIS 1315 HTML Tutorial 5: Working with Tables.
1 The Structure of a Web Table beginning of the table structure first row of three in the table end of the table structure table cells You do not need.
CS105 Introduction to Computer Concepts HTML
CHAPTER 11 Tables. How Are Tables Used Data Display  Very tidy and very useful Better Text Alignment  Putting text in tables allows you to format indents.
XHTML Tables. Tables create little boxes in which you can place things to keep them organized. The little boxes are called table cells. Tables are created.
XP Tutorial 7New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks.
Tutorial 5 Working with Web Tables. XP Objectives Explore the structure of a Web table Create headings and cells in a table Create cells that span multiple.
HTML II ECT 270 Robin Burke. 2 Outline Review Images text flow links Image maps Colors Tables.
Dr. Nuha El-KhaliliInternet Programming ( ) HTML Hyper Text Markup Language The language of web pages Maintained by the W3C
>> Introduction to HTML: Tables. HTML is used to give websites structure 5 Basic Tags Element = Start-Tag+Content+End-Tag Heading Tags [h1-h6] Paragraph.
10/4/2015Tables1 Spring, 2008 Modified by Linda Kenney 4/2/08.
CNIT 132 – Week 7 HTML - Tables. Tables on the World Wide Web A table can be displayed on a Web page either in a text or graphical format. A text table:
CS105 INTRODUCTION TO COMPUTER CONCEPTS HTML Instructor: Cuong (Charlie) Pham.
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
Tutorial 5 Working with Tables and Columns
Tutorial 5 Working with Tables and Columns
Using HTML tables.... Objectives... How to create tables Basic,, tags Some arguments with table Height, width, border Special “tricks” Cell text alignment.
XHTML 1.1  Derived from Standard Generalized Markup Language (SGML) of ISO  XHTML concerned primary with content rather than presentation and style 
XHTML1-1 Extensible HyperText Markup Language (XHTML) Part 2 Xingquan (Hill) Zhu
Introduction HTML (Hypertext Markup Language) is used to create document on the World Wide Web. HTML is not a programming language, it is a markup language.
Introducing Web Tables. Tables for tabulating items  Better looking  More flexibility  More efficient to explain information than plain text.
TABLES 1. In this chapter you will learn that tables have many uses in HTML. Objectives: Upon completing this section, you should be able to: 1. Insert.
ECA 228 Internet/Intranet Design I Tables. ECA 228 Internet/Intranet Design I Basic HTML Tables Created as a way to present rows and clumns of data.
Tutorial 5 Working with Web Tables. XP Objectives Explore the structure of a Web table Create headings and cells in a table Create cells that span multiple.
CIS234A- Lecture 7 Instructor Greg D’Andrea. Tables A table can be displayed on a Web page either in a text or graphical format. A text table: – contains.
Computer Science 101 Lists and Tables. Lists Unordered lists - use a bullet Ordered lists - use a number, Roman numeral, or letter.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 5: Working with Tables Kelly L.
CIS234A Lecture 8 Instructor Greg D’Andrea. Review Text Table contains only text, evenly spaced on the Web page in rows and columns uses only standard.
HTML Tables The HTML table model allows authors to arrange data - text, preformatted text, images, links, forms, form fields, other tables, etc. - into.
Lecture 6 More Advanced HTML Boriana Koleva Room: C54
Using Tables for Layout INP150 Session #8. Layout Map out your page Design with paper and pencil Determine number of rows and columns you need Determine.
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
Positioning Objects with CSS and Tables
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
©SoftMoore ConsultingSlide 1 Introduction to HTML: Block-Level Elements.
Tutorial 5: Tables Session OBJECTIVES Create a table Insert a table summary Insert a table caption Add rows and cells Merge Cells inside a Table.
Tables.  How tables are used  Basic table structure  Importance of headers  Spanning rows and columns  Cell padding and spacing  Accessibility.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Tutorial 5 Working with Web Tables. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Learn and Apply the structure of.
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Yourfriendmanoj.wordpress.com Fb/yourfriendmanoj
Working with Tables: Module A: Table Basics
>> HTML: Tables.
Tables and Frames.
HTML Tables CS 1150 Spring 2017.
Chapter 5 Introduction to XHTML: Part 2
Using HTML Tables SWBAT: - create tables using HTML
Presentation transcript:

JavaScript Professor Robin Burke

2 Outline Quiz Tables JavaScript

3 Quiz 10 min.

4 Quiz Answers

5 HTML continued Elements for overall document organization headings, paragraphs, lists images links

6 Tables A table is a rectangular region organized into rows and columns row-based definition element declares a table element declares a row element declares a division (cell) within a row

7 More elements declares a caption for the table declares a "header" cell usually bold and centered

8 Example This is a table First Row A1

9 Border control border attribute of table gives the width of the visible border set to 0 for "invisible" table frame controls which sides of the table are framed default = "box", many other options rules controls which directionality of borders default="all"

10 Table spacing cellspacing space between cells cellpadding space between cell text and cell border align (as for images) text flow around table

11 Other table attributes bgcolor background color for table width pixels or % of browser window height pixels or % of browser window

12 TR, TH and TD Share many table attributes bgcolor width, height % means % of table size align horizontal alignment valign vertical alignment

13 Table contents Must be row-by-row Table row element with cells inside

14 Spanning A cell can span multiple rows or columns Attributes of td and th colspan # of columns included rowspan # of rows included

15 Span example Cell spans two cols and two rows: Cell spans three cols: Cell spans ……………. Complete

16 Tables for layout A grid is the most common layout graphic layout tool Early versions of HTML provided no layout facilities logical structure only Tables provided a grid-based mechanism to get layout in spite of HTML controversial but widely-used

17 Table-based layout cons Platform-dependent Difficult for alternative renderings audio mobile platform Contrary to HTML spirit There is now an "approved" way to do layout style sheets

18 Example DePaul Homepage

19 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side interaction Style definition

20 Client-side interaction Example

21 Without JavaScript Browser can only display what the server sent each effect requires server round-trip too slow Client-side programming lets the browser handle user interaction makes web pages "dynamic"

22 For our purposes JavaScript is a reasonable first language Loosely typed Fewer details at first Interpreted Simple execution model  As long as you don't think too much about it Integrated with HTML Program files are just web pages Execution platform = browser No special tools to acquire

23 Programming HTML adds markup to text text is still there JavaScript little "content" beyond the program more abstract

24 Reading a program greet.html example What to see statements path of execution resources of the language function calls objects & properties user-defined and user-named items variables functions

25 Writing a program Design+construction process Meaning Start with requirements Plan the structure of the solution Implement the solution with available tools Making design decisions along the way Often evolutionary initial prototype improved upon until requirements met

26 In HTML Requirements some content text / images / links some organization for that content Plan sketching page layout Implement write HTML elements corresponding to layout design decisions layouts, style options Evolution view page in browser revise HTML

27 In JavaScript Requirements functional something we want the program to do Plan develop algorithm sequence of steps that will achieve the function Implement write each step of algorithm in formal language design decisions names, language elements Evolution debugging

28 Algorithm Steps to accomplish result We'll talk more about this later In "greet.html" ask user for name print name and greeting on page

29 Debugging Defects in programs can difficult to find error messages from browser can very unhelpful If you even see any! the computer doesn't "understand" your program programs are "brittle" Can be frustrating

30 Debugging tools Make sure to make errors visible browser settings Test your assumptions sometimes useful to print out values during computation Figure out exactly where the error occurs might not be where you think Reproduce the error in a simplified program sometimes your expectations are wrong

31 Variables An algorithm will have multiple steps Steps are linked by values value computed in step 1 used in step 2 Necessary to store computed values Variables names given to stored values firstName

32 Naming Names are arbitrary the computer does not care Names are crucial the human reader does care descriptive names are important Convention "camel case" firstName modifiers first, noun last

33 JavaScript language Syntax how statements are constructed Semantics what statements mean Operations what computations you can perform

34 Syntax (Ch. 4) statement ends in ; assignment statement variable = value; function call function name (parameters) "" delimits a list of characters as a string

35 Semantics assignment places a value in a named location function call invokes a named function with the given parameters may return a value

36 Prompt function prompt (promptValue, defaultValue) Effect opens a prompt dialog for user input Input prompt to be displayed initial value in text input area Result user's input string

37 document.write function document.write (text) Ignore the funny syntax for now Effect Writes text to the web page Input Text to output Result none

38 + operator Combines strings together string1 + string2 Input two string values Output single string value concatenated

39 Next class Cascading Style Sheets Reading online CSS Basic