CHAPTER 6
APPLET & HTML
Objectives
1. Understand how the Web browser controls
and executes the applets.
2. Creates a simple html
3. Familiar with the methods in the Applet class:
init(),start(), stop() and destroy().
HTML
Advantages of HTML
Disadvantages of HTML
Limited
Cannot create a new tags
User dont know exactly how a target document will
appear.
HTML Basic
HTML Structure
..continue
<HTML> .. </HTML>
The first document structure tag that every HTML
document contains.
Indicates that the content of the file is indeed HTML.
Everything in document should go inside the beginning
and ending HTML tags.
<HTML>
.
Document text
</HTML>
..continue
<HEAD> .. </HEAD>
.
</HEAD>
document text
</HTML>
MANAGEMENT & SCIENCE UNIVERSITY
..continue
<BODY> .. </BODY>
Syntax:
<HTML>
<HEAD>
<TITLE> This is the document title </TITLE>
</HEAD>
<BODY>
This is the document text
</BODY>
</HTML>
MANAGEMENT & SCIENCE UNIVERSITY
10
The text that we type into an HTML file outside of any of the
elements marked by the <HTML>, <HEAD>, <TITLE>, and
11
Line break
Use the line break tag, <BR> to indicate the start of a new
line.
Without line break tag, all text, even text we leave blank in
the HTML, file will run together into a single paragraph.
Should use the <BR> tag when we want to add a line break.
Line
A single tag, <HR>, indicates that the browser should create
a line. Which goes across the width of the display window.
Several parameter passed to the <HR> tag : SIZE, WIDTH,
ALIGN and NOSHADE.
12
Heading
Headings mark divisions of a document and divides
sections of a book into parts.
Can have up to six levels of heading.
Syntax:
<H1> course description </H1>
13
Integrating
Text
14
15
Integrating Image
Advantages of using image
Can convey a great deal of information very well.
Can make a page interesting and exciting
16
Image format
17
18