Introduction to HTML II Shih-Heng Chin Preface Structure of a - - PowerPoint PPT Presentation

introduction to html ii
SMART_READER_LITE
LIVE PREVIEW

Introduction to HTML II Shih-Heng Chin Preface Structure of a - - PowerPoint PPT Presentation

Introduction to HTML II Shih-Heng Chin Preface Structure of a HTML File Elements used frequently Tables Structure of a HTML File (HTML Version Information) Head Title Meta Data Body Important Meta Data Content-type Type Charset


slide-1
SLIDE 1

Introduction to HTML II

Shih-Heng Chin

slide-2
SLIDE 2

Preface

Structure of a HTML File Elements used frequently Tables

slide-3
SLIDE 3

Structure of a HTML File

(HTML Version Information) Head Title Meta Data Body

slide-4
SLIDE 4

Important Meta Data

Content-type Type Charset Refresh

slide-5
SLIDE 5

Example

<!DOCTYPE HTML PUBLIC "-/ /W3C/ /DTD HTML 4.01 Transitional/ /EN" "http:/ /www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Home - Web</title> <meta http-equiv="Content-Type" content="text/html; charset=Big5"> <meta http-equiv="refresh" content="10;URL=http:/ /www.yam.com"> </head> <body> Hi </body> </html>

slide-6
SLIDE 6

Result

slide-7
SLIDE 7

Elements Used Frequently

Text: FONT, B, I Paragraph: P, BR, PRE. ❋Space characters (Block: DIV , SPAN) List: OL, UL, LI Figure: IMG Hyperlink: A

slide-8
SLIDE 8

Structure of A Tag

<BODY bgcolor=”#FFFFFF”> Element name: BODY Attribute: Name: bgcolor Value: #FFFFFF Start tag: <BODY> End tag: </BODY>

slide-9
SLIDE 9

Attribute of FONT

size Value: 1, 2, 3, 4, 5, 6, 7 +n or -n color face

slide-10
SLIDE 10

Example of FONT

<FONT size=”3” color=”#FF0000”>3</FONT> <FONT size=”5”>5</FONT> <FONT size=”7”>7</FONT> <FONT size=”+3”>6</FONT>

slide-11
SLIDE 11

B, I

B Text in Bold Font <STRONG> I Text in Italic Font <EM>

slide-12
SLIDE 12

P, BR

P Form a paragraph BR Add a line break Start tag only, there isn’t </BR>

slide-13
SLIDE 13

PRE and Space Characters

In HTML, all continued space characters, include space and tab, are merged into one space only. Use PRE to control space character manually.

slide-14
SLIDE 14

Example of PRE

Without PRE: int main(void)<br> {<br> return 0;<br> } With PRE: <pre> int main(void) { return 0; } </pre>

slide-15
SLIDE 15

List - OL, UL, LI

OL Ordered lists UL Unordered lists LI List items

slide-16
SLIDE 16

Example of List

<ol> <li>Project Name</li> <li>Team Member</li> <li>Timeline </li> </ol> <ul> <li>CD</li> <li>LD</li> <li>DVD</li> </ul>

slide-17
SLIDE 17

Attributes of IMG

src - Location of image file, URI (protocol:/ / host/folder/resouse) width height alt - Text for user can’t display images border Start tag only

slide-18
SLIDE 18

Attributes of A

href target Frame id Window id _blank, _top, _parent, _self

slide-19
SLIDE 19

Tables

Basic Table Structure Merge cells

slide-20
SLIDE 20

Basic Table Structure

Cell Row Table

slide-21
SLIDE 21

Table Elements

TABLE Row: TR Cell: TD, TH

slide-22
SLIDE 22

Attribute of TABLE

bgcolor border width, height cellspacing cellpadding

slide-23
SLIDE 23

width, height of TABLE

pixels width=”300” percent width=”90%”

slide-24
SLIDE 24

border, cellspacing, cellpadding

border cellspacing cellpadding

slide-25
SLIDE 25

Example of TABLE

<table> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>4</td> <td>5</td> <td>6</td> </tr> <tr> <td>7</td> <td>8</td> <td>9</td> </tr> </table>

1 2 3 4 5 6 7 8 9

slide-26
SLIDE 26

Merge Cells

Attributes of TD rowspan Merge cells in the same column colspan Merge cells in the same row

slide-27
SLIDE 27

Example of Merging Cells

<table align="center"> <tr> <td colspan="2">1</td> <td>3</td> </tr> <tr> <td>4</td> <td>5</td> <td rowspan="2">6</td> </tr> <tr> <td>7</td> <td>8</td> </tr> </table>

1 3 4 5 6 7 8