1. Trang chủ
  2. » Công Nghệ Thông Tin

Lập trình web với Java pdf

38 624 9

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 38
Dung lượng 1,57 MB

Nội dung

Web Programming with Java HyperText Markup Language Basics Huynh Huu Viet University of Information Technology Department of Information Systems Email: viethh@uit.edu.vn... 2008 © Depart

Trang 1

Web Programming with Java

HyperText Markup Language Basics

Huynh Huu Viet

University of Information Technology Department of Information Systems

Email: viethh@uit.edu.vn

Trang 2

2008 © Department of Information Systems - University of Information Technology 2

Trang 3

2008 © Department of Information Systems - University of Information Technology 3

Trang 4

2008 © Department of Information Systems - University of Information Technology 4

WWW Client/Server Model

`

Client

Web Server Request

Response

• Microsoft Internet Information Server

• Apache Web Server

Trang 5

2008 © Department of Information Systems - University of Information Technology 5

Client's Functions

desired protocol.

"human-readable" results.

Trang 6

2008 © Department of Information Systems - University of Information Technology 6

Server's Functions

Trang 7

2008 © Department of Information Systems - University of Information Technology 7

Client/Server Interaction

Trang 8

2008 © Department of Information Systems - University of Information Technology 8

Client/Server Interaction

Trang 9

2008 © Department of Information Systems - University of Information Technology 9

Client/Server Interaction

Trang 10

2008 © Department of Information Systems - University of Information Technology 10

Client/Server Interaction

Trang 11

2008 © Department of Information Systems - University of Information Technology 11

Client/Server Interaction

Trang 12

2008 © Department of Information Systems - University of Information Technology 12

Client/Server Interaction

Trang 13

2008 © Department of Information Systems - University of Information Technology 13

Client/Server Interaction

Trang 14

2008 © Department of Information Systems - University of Information Technology 14

Trang 15

2008 © Department of Information Systems - University of Information Technology 15

ƒ <tag> text </tag>

ƒ <tag attribute=argument> text </tag>

Trang 16

2008 © Department of Information Systems - University of Information Technology 16

Trang 17

2008 © Department of Information Systems - University of Information Technology 17

HTML Basics: Head Tags

<head>

<title> Weiss Associates </title>

<meta name=“keywords” content=“…”>

<meta name=“description” content=“…”>

<style> </style>

</head>

Trang 18

2008 © Department of Information Systems - University of Information Technology 18

HTML Basics: Body Tags

<body bgcolor=“red”>

<body background=“images/darthvader.jpg”>

<body link=“red” vlink=“blue” alink=“orange”>

Trang 19

2008 © Department of Information Systems - University of Information Technology 19

HTML Basics: Text Formats

™ <pre></pre> Creates preformatted text

™ <h1></h1> Creates the largest headline

™ <h6></h6> Creates the smallest headline

™ <b></b> Creates bold text

™ <i></i> Creates italic text

™ <em></em> Emphasizes a word

™ <font size=#></font> Sets size of font, from 1 to 7

™ <font color=?></font> Sets font color

Trang 20

2008 © Department of Information Systems - University of Information Technology 20

HTML Basics: Formatting

™ <hr> Creates a horizontal line

™ <center></center> Centers a block of text

™ <p></p> Creates a new paragraph

™ <p align=?> Aligns a paragraph to the left, right, or center

™ <br> Inserts a line break

™ <blockquote> </blockquote> Indents text from both sides

™ <ol></ol> Creates a numbered list

™ <li></li> Precedes each list item, and adds a number

™ <ul></ul> Creates a bulleted list

Trang 21

2008 © Department of Information Systems - University of Information Technology 21

HTML Basics: Graphics

™ <img src="name">

ƒ Adds an image

™ <img src="name" align=?>

ƒ Aligns an image: left, right, center; bottom, top, middle

™ <img src="name" border=?>

ƒ Sets size of border around an image

™ <img src="name" width=? height=?>

ƒ Sets size of of an image in pixels

Trang 22

2008 © Department of Information Systems - University of Information Technology 22

Trang 23

2008 © Department of Information Systems - University of Information Technology 23

HTML Basics: Tables I

<table></table> Creates a table

<tr></tr> Sets off each row in a table

<td></td> Sets off each cell in a row

Trang 24

2008 © Department of Information Systems - University of Information Technology 24

HTML Basics: Tables II

™ <table border=#> Sets width of border around table cells

™ <table cellspacing=#> Sets amount of space between table cells

™ <table cellpadding=#> Sets amount of space between a cell's border and its contents

™ <table width=# or %> Sets width of table - in pixels or as a percentage of document width

™ <tr align=?> or <td align=?> Sets alignment for cell(s) (left, center, or right)

™ <tr valign=?> or <td valign=?> Sets vertical alignment for cell(s) (top, middle, or bottom)

™ <td colspan=#> Sets number of columns a cell should span

™ <td rowspan=#> Sets number of rows a cell should span (default=1)

Trang 25

2008 © Department of Information Systems - University of Information Technology 25

HTML Basics: Colors

Trang 26

2008 © Department of Information Systems - University of Information Technology 26

Trang 27

2008 © Department of Information Systems - University of Information Technology 27

File Management

™ Organize and plan your site

™ Default file: index.htm(l) or default.htm(l)

™ Use meaningful file and directory names

™ Cross-platform compatibility (PC, Mac,

UNIX)

™ Consistency (lowercase, UPPERCASE)

™ Only use only letters, numbers and “_”, “-”, and “.”

™ Media files need appropriate extensions

(.gif, jpg, mov)

™ Create backups

Trang 28

2008 © Department of Information Systems - University of Information Technology 28

filenames

™ Keep it Simple!

Trang 29

2008 © Department of Information Systems - University of Information Technology 29

Trang 30

2008 © Department of Information Systems - University of Information Technology 30

Sample Exercise

™ Objective: Use simple HTML concepts to

create a web page

Trang 31

2008 © Department of Information Systems - University of Information Technology 31

Step 1: Structure

Trang 32

2008 © Department of Information Systems - University of Information Technology 32

Step 2: Include Table

Trang 33

2008 © Department of Information Systems - University of Information Technology 33

Step 3: Add Table Rows

Trang 34

2008 © Department of Information Systems - University of Information Technology 34

Step 4: Add Table Data

Trang 35

2008 © Department of Information Systems - University of Information Technology 35

Step 6: Save and View

Trang 36

2008 © Department of Information Systems - University of Information Technology 36

Step 6: Save and View

Trang 37

2008 © Department of Information Systems - University of Information Technology 37

Readings & Exercise

Trang 38

2008 © Department of Information Systems - University of Information Technology 38

Discussion

Ngày đăng: 07/08/2014, 05:20

TỪ KHÓA LIÊN QUAN

w