Chapter 8 Introduction to HTML and Applets Fundamentals of Java.

Slides:



Advertisements
Similar presentations
Computers: Tools for an Information Age Writing Your Own Web Page: Using HTML and Web Authoring Tools.
Advertisements

1 Chapter 9 Introduction to HTML and Applets Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Chapter 4 Marking Up With Html: A Hypertext Markup Language Primer.
HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure.
XP Browser and Basics1. XP Browser and Basics2 Learn about Web browser software and Web pages The Web is a collection of files that reside.
Introduction to HTML CPS470 Software Engineering Fall 1998.
CIS101 Introduction to Computing Week 05. Agenda Your questions Exam next week - Excel Introduction to the Internet & HTML Online HTML Resources Using.
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Write basic.
1 Applets Chapter 1 To understand:  why applets are used to extend the capabilities of Web pages  how an applet is executed and know about the restrictions.
World Wide Web1 Applications World Wide Web. 2 Introduction What is hypertext model? Use of hypertext in World Wide Web (WWW) – HTML. WWW client-server.
Introduction to HTML 2006 CIS101. What is the Internet? Global network of computers that are connected and communicate via a series of Protocols Protocols.
Introduction to HTML 2006 INT197B. What is the Internet? Global network of computers that are connected and communicate via a series of Protocols Protocols.
Introduction to HTML 2004 CIS101. What is the Internet? Global network of computers that are connected and communicate via a series of Protocols Protocols.
Marking Up With Html: A Hypertext Markup Language Primer
Applets, HTML and GUI’s Recitation – 04/11/2008 CS 180 Department of Computer Science, Purdue University.
Glencoe Digital Communication Tools Create a Web Page with HTML Chapter Contents Lesson 4.1Lesson 4.1 Get Started with HTML (85) Lesson 4.2Lesson 4.2 Format.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Chapter 14 Introduction to HTML
CIS101 Introduction to Computing Week 06. Agenda Your questions Excel Exam during second hour Our status after the snow day Introduction to the Internet.
© 2005 ComputerPREP, Inc. All rights reserved. HTML 4.0 and Web Page Design Module I.
Basics of HTML Shashanka Rao. Learning Objectives 1. HTML Overview 2. Head, Body, Title and Meta Elements 3.Heading, Paragraph Elements and Special Characters.
Presenting Information on WWW using HTML. Presenting Information on the Web with HTML How Web sites are organized and implemented A brief introduction.
Chapter 4 Fluency with Information Technology L. Snyder Marking Up With HTML: A Hypertext Markup Language Primer.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Computer Science 101 Introduction to Web Pages. Origins of the Web Vannevar Bush (Memex, 1945) Ted Nelson (Xanadu, 1968) Doug Englebart and Alan Kay (
Chapter 16 The World Wide Web Chapter Goals ( ) Compare and contrast the Internet and the World Wide Web Describe general Web processing.
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
Chapter 16 The World Wide Web. 2 The Web An infrastructure of information combined and the network software used to access it Web page A document that.
HTML HyperText Markup Language Constantly evolving - extra facilities being added regularly Java applets and JavaScript used to increase functionality.
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
Chapter 6 The World Wide Web. Web Pages Each page is an interactive multimedia publication It can include: text, graphics, music and videos Pages are.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
Chapter 4: Hypertext Markup Language Primer TECH Prof. Jeff Cheng.
Understanding HTML Code
Applets Chapter 17.  Java’s big splash onto the scene came in the mid 90’s. The people at Sun Microsystems had managed to work java programs into Web.
Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and attributes Create.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Write basic.
Chapter 13. Applets and HTML HTML Applets Computer Programming with JAVA.
1 John Magee 9 November 2012 CS120 Lecture 17: The World Wide Web and HTML Web Publishing.
1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster
Nell Dale & John Lewis (adaptation by Michael Goldwasser) The World Wide Web.
Lec.10 + (Chapter 8 & 9) GUI Java Applet Jiang (Jen) ZHENG July 6 th, 2005.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
Introduction to HTML Xiangming Mu 9/23/ Learning Objectives Understand basic HTML tags and their attributes Learn to create a simple HTML page.
Chapter 2 Designing Web Pages With HTML JavaMethods An Introduction to Object-Oriented Programming Maria Litvin Gary Litvin Copyright © 2003 by Maria Litvin,
HTML BTEC National in Computing Section5. Create Information “HTML: defining HTML, discussing HTML uses and demonstrating HTML basics, HTML structure…..
Chapter 29 World Wide Web & Browsing World Wide Web (WWW) is a distributed hypermedia (hypertext & graphics) on-line repository of information that users.
Introduction to Computers 12/6/ BEGINNING HTML DESIGNING YOUR OWN WWW PAGES.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
Website design and structure. A Website is a collection of webpages that are linked together. Webpages contain text, graphics, sound and video clips.
Chapter 131 Applets and HTML Chapter Objectives learn how to write applets learn to write a simple HTML document learn how to embed an applet in.
Introduction to HTML. _______________________________________________________________________________________________________________ 2 Outline Key issues.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup.
LBSC 690 Session 4 Programming. Languages How do we learn a language? Learn by listening Then reading Then writing How do we teach programming? Learn.
Writing Your Own Web Page: Using HTML and FrontPage Chapter 10.
The Internet Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
HTML And the Internet. HTML and the Internet ► HTML: HyperText Markup Language  Language in which all pages on the web are written  Not Really a Programming.
Computer Basics Introduction CIS 109 Columbia College.
Chapter 8 Introduction to HTML and Applets
HTML Basics.
Section 4.1 Section 4.2 Format HTML tags Identify HTML guidelines
Marking Up with XHTML Tags describe how a web page should look
Introduction to XHTML.
COMPUTING FUNDAMENTALS
Chapter 16 The World Wide Web.
Presentation transcript:

Chapter 8 Introduction to HTML and Applets Fundamentals of Java

2 Objectives Understand the basic features of hypertext, hypermedia, and the World Wide Web. Use basic HTML markup tags to format text for a Web page. Construct an HTML list and an HTML table to represent a linear sequence of items and a two-dimensional grid of items, respectively.

Fundamentals of Java 3 Objectives (cont.) Use the appropriate markup tags to include images in Web pages. Create links to other Web pages using absolute or relative path names. Convert a Java application to an applet and embed the applet in a Web page. Understand the constraints on applets that distinguish them from Java applications.

Fundamentals of Java 4 Vocabulary Absolute path name Associative link Definition list External image Hyperlinks Hypermedia Hypertext

Fundamentals of Java 5 Vocabulary (cont.) Hypertext markup language (HTML) Inline image Markup tag Memex Relative path name Uniform resource locator (URL)

Fundamentals of Java 6 Hypertext, Hypermedia, and the World Wide Web Memex: Theoretical machine proposed by Vannevar Bush in 1945 that would link information in tables by keys – Every computer would have a memex that was linked to the memexes on other computers. – Associative links between computers: Could be traced backwards and forwards

Fundamentals of Java 7 Hypertext, Hypermedia, and the World Wide Web (cont.) Hypertext: A structure consisting of nodes and links between them – Links to other nodes typically displayed to users as embedded, highlighted terms within a given chunk of text Early hypertext systems: – Douglas Englebart’s NLS/Augment (1968) – Cognetics Corporation’s Hyperties (mid-1980s)

Fundamentals of Java 8 Hypertext, Hypermedia, and the World Wide Web (cont.) Hypermedia: Extended hypertext that adds: – GUIs – Images – Sound – Animation – Applications

Fundamentals of Java 9 Hypertext, Hypermedia, and the World Wide Web (cont.) With development of the Internet, people began to think of sharing hypertext across a network of communicating machines. – Each node is a page. – Each page is linked to the World Wide Web. The Web consists of: – Servers: House pages of information – Clients: Run browsers to access information on servers

Fundamentals of Java 10 Hypertext, Hypermedia, and the World Wide Web (cont.) When you view a page in a browser and click on a link: – The browser sends a message to the node’s machine, requesting a transfer of its information. – If the request is successful, the information at the node is downloaded to the user’s browser.

Fundamentals of Java 11 Hypertext, Hypermedia, and the World Wide Web (cont.) Networked hypermedia systems require uniform means of: – Representing data via a machine-independent hypertext markup language – Assigning node addresses using machine- independent uniform resource locators (URLs)

Fundamentals of Java 12 Hypertext, Hypermedia, and the World Wide Web (cont.) Networked hypermedia systems require uniform means of (cont.): – Transmitting information from site to site using machine-independent network transmission protocols – Displaying information with browsers from different vendors

Fundamentals of Java 13 Overview of the Hypertext Markup Language Hypertext markup language (HTML): Machine-independent language for representing information in a networked- based hypermedia system Markup tags: Indicate format of textual elements or links to other nodes

Fundamentals of Java 14 Overview of the Hypertext Markup Language (cont.) Figure 8-1: The Internet

Fundamentals of Java 15 Overview of the Hypertext Markup Language (cont.) Figure 8-2: Simple Web page

Fundamentals of Java 16 Overview of the Hypertext Markup Language (cont.) HTML for the simple Web page:

Fundamentals of Java 17 Overview of the Hypertext Markup Language (cont.) The document must be stored in a file having the extension: – “.html” on a UNIX system – “.htm” on a Windows system Markup tags begin with a left angle bracket ( ). – Not case sensitive

Fundamentals of Java 18 Overview of the Hypertext Markup Language (cont.) Tags often occur in pairs. – Mark the start and end of a tag. – and Tags can include attributes. –

Fundamentals of Java 19 Overview of the Hypertext Markup Language (cont.) Table 8-1: Basic HTML markup tags

Fundamentals of Java 20 Overview of the Hypertext Markup Language (cont.) Minimal document structure:

Fundamentals of Java 21 Overview of the Hypertext Markup Language (cont.) HTML tag: Informs browser that it is dealing with an HTML document HEAD tag: Identifies first part of document TITLE tag: Identifies document’s title – Displayed at top of browser’s window – Used during searches for the document BODY tags: Enclose information provided by the HTML document

Fundamentals of Java 22 Simple Text Elements Headings: Six levels – H1 through H6 – Different font size and style than normal text – Heading Text Paragraphs: Contained within …

Fundamentals of Java 23 Simple Text Elements (cont.) Forced line breaks: tag Preformatted text: Display text “as is” – Contained within … tags

Fundamentals of Java 24 Character-Level Formatting Table 8-2: Some character format tags

Fundamentals of Java 25 Character-Level Formatting (cont.) Escape sequences: Codes to display special characters Table 8-3: Some escape sequences

Fundamentals of Java 26 Lists Unordered (bulleted) lists: Tag Numbered (ordered) lists: Tag Definition (association) lists: Tag For bulleted and ordered lists, use tag for each element in the list. For definition lists, use tag for terms and tag for definitions.

Fundamentals of Java 27 Lists (cont.) Unordered list example: Definition list example:

Fundamentals of Java 28 Lists (cont.) Nested list example:

Fundamentals of Java 29 Lists (cont.) Figure 8-4: Nested list

Fundamentals of Java 30 Linking to Other Documents Links (hyperlinks or hypertext references): Allow readers to move to other pages in the Web – Anchor tag: – Can appear anywhere within any html document – Hyperlinked text is highlighted in some way when displayed: Underlined or a different color, or both

Fundamentals of Java 31 Linking to Other Documents (cont.) Steps to place a link in a document: – 1. Identify target document that will be at link’s other end. Path name or URL – 2. Determine text that labels the link in the browser. – 3. Place this information within an anchor. text of link

Fundamentals of Java 32 Linking to Other Documents (cont.) Path names: – Absolute path name: Specifies exact position of the file in the computer’s directory structure – Relative path name: Specifies a document’s position relative to that of the currently displayed document Uniform resource locator (URL): Used to specify files on another computer – name/document path name

Fundamentals of Java 33 Linking to Other Documents (cont.) Table 8-4: Relative path names to MyPage.html

Fundamentals of Java 34 Multimedia Inline images: Displayed when user opens a page – – Images can be in GIF or JPEG format. – Size attributes: – Alignment attribute:

Fundamentals of Java 35 Multimedia (cont.) External images: Not displayed until user clicks on a link – Use the anchor tag – Sample picture Colors and backgrounds: String of three, two-digit hexadecimal numbers specifies a color by indicating RGB value.

Fundamentals of Java 36 Multimedia (cont.) Table 8-5: Some hypermedia filename extensions

Fundamentals of Java 37 Tables Figure 8-8: A table

Fundamentals of Java 38 Tables (cont.) Table 8-6: Table format tags

Fundamentals of Java 39 Tables (cont.) Table 8-7: Table attributes

Fundamentals of Java 40 Tables (cont.) Typical table format:

Fundamentals of Java 41 Applets A Java application that runs in a Web page – Two components necessary: HTML document that contains an applet markup tag Byte code file for the applet An applet markup tag has the following form: – Applets present a graphical user interface.

Fundamentals of Java 42 Applets (cont.) Figure 8-9: Applet within a Web page

Fundamentals of Java 43 Applets (cont.) HTML code:

Fundamentals of Java 44 Applets (cont.) Converting a Java application to an applet: – Replace the name JFrame with the name JApplet at the beginning of the class definition (extends JApplet ). – Replace constructor by the method init :

Fundamentals of Java 45 Applets (cont.) Example 8.2: Applet with a specialized panel

Fundamentals of Java 46 Applets (cont.) Sun’s applet viewer: Allows programmer to run an applet and view just its GUI – Without the surrounding Web page – Steps to use applet viewer: Compile the Java source program as usual. Create HTML file with at least the minimal applet tag for the applet. At the command line prompt, run appletviewer.

Fundamentals of Java 47 Applets (cont.) Constraints on applets: – Cannot access local files – Byte code file and html file should be in same directory. – Dialog boxes may appear differently. Loading images into an applet:

Fundamentals of Java 48 Applets (cont.) Passing parameters to applets: – Example HTML: Accessing the parameter from the applet class:

Fundamentals of Java 49 Summary The World Wide Web is a hypermedia system that allows users to navigate among and use resources in a nonlinear manner. HTML tags can format text for Web pages. Links to other pages using absolute or relative path names can be included in HTML elements.

Fundamentals of Java 50 Summary (cont.) Web pages can contain applets or Java applications that are downloaded from a Web server and run in the user’s Web browser. A few steps are needed to convert an application to an applet. Applets have most of the functionality of applications, including the GUI, but they lack file access to the user’s disks.