1 Week 1 l HTML l Applets Applets and HTML. 2 Overview l Applets: Java programs designed to run from a document on the Internet l HTML: Hypertext Markup.

Slides:



Advertisements
Similar presentations
Math Introduction to HTML Gavin Shaddick
Advertisements

Internet Services and Web Authoring (CSET 226) Lecture # 5 HyperText Markup Language (HTML) 1.
HTML. The World Wide Web Protocols Addresses HTML.
Introduction to HTML Bent Thomsen Institut for Datalogi Aalborg Universitet.
Hypertext Markup Language. Platform: - Independent  This means it can be interpreted on any computer regardless of the hardware or operating system.
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.
Web development  World Wide Web (web) is the Internet system for hypertext linking.  A hypertext document (web page) is an online document. It contains.
CIS101 Introduction to Computing Week 05. Agenda Your questions Exam next week - Excel Introduction to the Internet & HTML Online HTML Resources Using.
CIS101 Introduction to Computing Week 05. Agenda Your questions CIS101 Survey Introduction to the Internet & HTML Online HTML Resources Using the HTML.
Chapter 12Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Announcements/Reminders l Happy Tax Day! l Project 8 due on Thursday.
CIS101 Introduction to Computing
Internet Publishing / Dreamweaver Luke E. Reese ANR Educ. and Communication Systems
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.
MA10126 Introduction to HTML Gavin Shaddick
Introduction to HTML 2004 CIS101. What is the Internet? Global network of computers that are connected and communicate via a series of Protocols Protocols.
Chapter 131 Applets and HTML Chapter Reminders Project 8 due Dec 10:30 pm Project 6 regrades due by midnight tonight –Submit all files (including.
HTML Introduction HTML
Internet Publishing / Dreamweaver Luke E. Reese CARRS
HTML Companion. Lecture Objectives Learn about HTML. Know basic HTML tags.
Chapter 20 Applets Slides prepared by Rose Williams, Binghamton University Copyright © 2008 Pearson Addison-Wesley. All rights reserved.
Computer Science 103 Chapter 2 HyperText Markup Language (HTML)
Developing a Basic Web Page with HTML
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.
CIS101 Introduction to Computing Week 06. Agenda Your questions Excel Exam during second hour Our status after the snow day Introduction to the Internet.
CPSC 203: Introduction to Computers Tutorials 03 & 29 by Jie (Jeff) Gao.
Basic HTML The Magic Of Web Pages. Create an HTML folder  Make a folder in your H drive and name it “HTML”. We will save EVERYTHING for this unit here.
Web Development 311 Fall : Fall Why web pages? Most companies have intranets, extranets, and web sites Content can be changed quickly and.
CPSC 203 Introduction to Computers Lab 39, 40 By Jie (Jeff) Gao.
Chapter 13Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Chapter 13 l HTML l Applets Applets and HTML.
HTML HyperText Markup Language Constantly evolving - extra facilities being added regularly Java applets and JavaScript used to increase functionality.
Tutorial 1 Getting Started with Adobe Dreamweaver CS3
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.
XP Mohammad Moizuddin Creating Web Pages with HTML Tutorial 1 1 New Perspectives on Creating Web Pages With HTML Tutorial 1: Developing a Basic Web Page.
Introduction to HTML. What is a HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Copyright 2006 South-Western/Thomson Learning Chapter 17 Creating and Linking Web Pages.
JAVA: An Introduction to Problem Solving & Programming, 5 th Ed. By Walter Savitch and Frank Carrano. ISBN © 2009 Pearson Education, Inc., Upper.
XP New Perspectives on The Internet, Sixth Edition— Comprehensive Tutorial 8 1 Creating Effective Web Pages Creating HTML Documents Tutorial 8.
Exploring the Digital Domain HTML Basics. HTML Hypertext Markup Language Standard (ASCII) text with embedded format codes Most HTML tags are paired Tags.
Web Programming Basics of HTML. HTML stands for Hyper Text Mark-up Language A mark-up language is different than those that you have learned before in.
Web Programming : Building Internet Applications Chris Bates CSE :
HTML Hyper Text Markup Language. What is an HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup.
HTML,DHTML & Javascript/Session1/1 of 39 Introduction and Basic Tags Session 1 of Using HTML, DHTML & JavaScript.
Chapter 8 Introduction to HTML and Applets Fundamentals of Java.
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Write basic.
HTML BASICS Web Design I. Web Design  WWW created in the late 1980’s  Used in academics for the next 5 years  Mosaic (1994) allowed both pictures &
Chapter 13. Applets and HTML HTML Applets Computer Programming with JAVA.
1 Creating Web Pages Part 1. 2 OVERVIEW: HTML-What is it? HyperText Markup Language, the authoring language used to create documents on the World Wide.
Chapter 13Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Chapter 13 l HTML l Applets Applets and HTML.
Internet Publishing Luke E. Reese ANR Education and Communication Systems
CPSC 203 Introduction to Computers Lab 33 By Jie Gao.
Lec.10 + (Chapter 8 & 9) GUI Java Applet Jiang (Jen) ZHENG July 6 th, 2005.
Ali Alshowaish. What is HTML? HTML stands for Hyper Text Markup Language Specifically created to make World Wide Web pages Web authoring software language.
LEARNING HTML PowerPoint #1 Cyrus Saadat, Webmaster.
HTML BTEC National in Computing Section5. Create Information “HTML: defining HTML, discussing HTML uses and demonstrating HTML basics, HTML structure…..
1 Chapter 01: Introduction by Tharith Sriv. This course covers the following topics:  Hypertext Markup Language (HTML)  Cascading Style Sheets  JavaScript.
Introduction to Computers 12/6/ BEGINNING HTML DESIGNING YOUR OWN WWW PAGES.
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.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
HTML – The Basics COE 201- Computer Proficiency. The Internet The World Wide Web ▫Also known as the Web ▫Created in 1989  European Laboratory for Particle.
Internet Publishing / Dreamweaver Luke E. Reese Biosystems & Ag. Engr. / CARRS
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.
CS 100 Introduction to Web Page Construction and HTML.
Tutorial 1 Getting Started with Adobe Dreamweaver CS5.
Introduction to HTML.
Chapter 13 Applets and HTML HTML Applets.
Presentation transcript:

1 Week 1 l HTML l Applets Applets and HTML

2 Overview l Applets: Java programs designed to run from a document on the Internet l HTML: Hypertext Markup Language »a language used to create Internet documents l Applets run within an HTML document l HTML documents are run by a web browser, e.g. »Netscape Navigator or »Microsoft Internet Explorer

3 Applets l Applet: small application l Applets are Java programs embedded in HTML documents »Therefore, they run in a browser that views the document They are a derived class of the class Applet. Applet class is in the applet library, so import java.applet.*

4 Applet Basics When writing applets your list of import statements will usually look like this: import java.applet.*; import java.awt.*; import java.awt.event.*;

5 Applet Basics Applets use a method named init() for these purposes: »setting colors »adding buttons »adding text fields, etc. l The HTML document takes care of sizing the applet l Use a layout manager when defining an applet »use the setLayout method »FlowLayout is the default

6 Example: a Trivial Applet HelloApplet.java Defining an applet

7 HTML: H yper T ext M arkup L anguage l Hypertext: text with items you can click with a mouse to send you to another document l Link: an item you can click with the mouse to go to another document »also called hyperlink l Page: an HTML document »it is not equal to a page of print or a single screen of display »HTML page and HTML document mean the same thing l HTML is a "suggestive formatting" language »it is not a full-blown programming language like Java »it suggests to the browser how to display text or other objects

8 HTML Basics l Most HTML commands are of the form some text l Some commands do not require the part l HTML is not case sensitive »i.e. the commands are not »text displays in whatever case it is in in the document l HTML files are plain text files created with any text editor l HTML file names should follow the operating system's rules and end in.html or.htm

9 A Few HTML Commands Page Title Heading 1- largest, most prominent heading text Heading 2 - a sub-heading, etc. Additional sub-headings Break - begin a new line ( not required) Paragraph - begin a new paragraph ( not required) Comment field - not displayed by browser text Center text horizontally on page title Used for browser "book marks" (displays in browser title bar)

10 Outline of a Basic Page and a Few More HTML Commands begin an HTML document begin the document's header (title usually goes here) end of document's header begin stuff that will appear in the main window of the browser blank lines are ignored - use them to make code more readable (body of html document: html commands, text, applets, etc.) end stuff that displays in main window of browser date and link to the address that follows ( address of person maintaining the page) end address end the HTML document

11 HTML: Suggestive Formatting l Most HTML commands suggest rather than dictate how text will be displayed l For example, Heading 1 in one browser may be in Arial font but another browser may display it in Times New Roman »the font size and other attributes may differ as well l Different browsers and systems also result in different line breaks, colors, etc., so WYSIWYG (What You See Is What You Get) does not apply to either the text HTML file or what displays in your browser »getting HTML documents to display nicely in all browsers and systems is important but non-trivial »the examples used here are simple and should not be a problem, so we will not go into any detail about differences in browsers

12 Inserting a Hyperlink Hyperlinks - The real power of HTML l Syntax: text to display »the path can be local - any absolute or relative path to a local file »or... It can be a URL (internet address) plus path name to a file on a remote system! l Example: Walter Savitch Displays as: Walter Savitch

13 URL: Uniform Resource Locator l An internet address that uniquely identifies a location l A kind of path name for the Internet l But not just an ordinary address »the first part tells what protocol to use to make the link »a protocol is a set of rules for transferring and interpreting data »both ends of a link must implement the same protocol to have intelligible communications »http and ftp are two examples of Internet protocols »http is the name of the protocol for HTML documents

14 Gotcha : Not Using Your Reload (Refresh) Button l Browsers keep copies of most recently used HTML pages »runs faster because it can recover pages much faster »might not show changes that you make to a page l Click Reload, Refresh (or similar) button »browser will reload page and show you the latest version l Reload, Refresh do not always work with Java applets

15 Displaying a Picture l Here is the HTML command for inserting a picture in a document: For example, if the picture file you want is named mypicture.gif and it is in the images subdirectory of the directory that contains your HTML document: l Various picture formats may be used and are generally indicated by the ".xxx" extension in the file name ».gif and.jpg are two common ones

16 HTML Is a Low-Level Language l HTML for web browser is analogous to assembly language for a computer »many details that designer must take care of l Most web page designers now use a high-level design language that translates into HTML l Three examples »Dreamweaver (Macromedia, Inc.) »FrontPage (Microsoft Corporation) »GoLive (Adobe Systems Inc.)

17 Running an Applet from an HTML Page The normal way to run an applet is from an HTML document. Syntax: Example: Note:use the compiled file extension.class, not the source extension.java

18 Another Way to Test an Applet l Use the appletviewer in an integrated Java development environment l There are many commercial development environments that provide handy tools to write, compile, run and debug Java programs l Typically they have a menu selection something like "Run" or "Execute" to run an application »usually they will automatically create an applet viewer if you run an applet

19 Applets and Security l Applets are someone else's program running on your computer. l Security issues: »viruses »reading confidential information »corrupting operating system l Security features of applets to help avoid these problems: »Applets cannot run any programs on your computer. »Applets cannot read or write to files on your computer (unless the applet originated on your computer).