Microsoft PowerPoint - HTML(3)

Similar documents
A-1 HTML A-1-1 HTML 1 HTML JSP HTML HTML HTML JSP A HTML HTML HTML HTML HTML HTML HTML HTML.htm.html HTML Windows NotePad HTML IE [ / ] NotePad A-2

p.2 1 <HTML> 2 3 <HEAD> 4 <TITLE> </TITLE> 5 </HEAD> 6 7 <BODY> 8 <H3><B> </B></H3> 9 <H4><I> </I></H4> 10 </BODY> </HTML> 1. HTML 1. 2.

Preface This guide is intended to standardize the use of the WeChat brand and ensure the brand's integrity and consistency. The guide applies to all d

Microsoft PowerPoint - STU_EC_Ch08.ppt

Microsoft Word - template.doc

Windows XP

5-1 nav css 5-2

Chn 116 Neh.d.01.nis


Chapter 9: Objects and Classes

F477

:5-6

K301Q-D VRT中英文说明书141009

1.ai

4. 每 组 学 生 将 写 有 习 语 和 含 义 的 两 组 卡 片 分 别 洗 牌, 将 顺 序 打 乱, 然 后 将 两 组 卡 片 反 面 朝 上 置 于 课 桌 上 5. 学 生 依 次 从 两 组 卡 片 中 各 抽 取 一 张, 展 示 给 小 组 成 员, 并 大 声 朗 读 卡

硕 士 学 位 论 文 论 文 题 目 : 北 岛 诗 歌 创 作 的 双 重 困 境 专 业 名 称 : 中 国 现 当 代 文 学 研 究 方 向 : 中 国 新 诗 研 究 论 文 作 者 : 奚 荣 荣 指 导 老 师 : 姜 玉 琴 2014 年 12 月

《红楼梦》中茗烟与李贵的对比分析

区 域 活 动 进 入 中 班 我 们 区 域 的 设 置 和 活 动 材 料 都 有 所 变 化, 同 时 也 吸 引 孩 子 们 积 极 的 参 与 学 习 操 作 区 的 新 材 料 他 们 最 喜 欢, 孩 子 们 用 立 方 块 进 行 推 理 操 作 用 扑 克 牌 进 行 接 龙 游

2015 Chinese FL Written examination

<4D F736F F D20BCFAA755AAA92DABC8AE61AAE1A5ACB2A3B77EB56FAE69A4A7ACE3A873A147A548B8EAB7BDB0F2C2A6AABAC65BC2492E646F63>

Microsoft Word doc

(baking powder) 1 ( ) ( ) 1 10g g (two level design, D-optimal) 32 1/2 fraction Two Level Fractional Factorial Design D-Optimal D

PowerPoint Presentation

第三章 国内外小组合作学习的应用情况

ch_code_infoaccess

蔡 氏 族 譜 序 2

天 主 教 輔 仁 大 學 社 會 學 系 學 士 論 文 百 善 孝 為 先? 奉 養 父 母 與 接 受 子 女 奉 養 之 態 度 及 影 響 因 素 : 跨 時 趨 勢 分 析 Changes in attitude toward adult children's responsibilit

2017 CCAFL Chinese in Context

Analysis of Cultural Elements of Meinong s Paper Umbrella Painting Abstract Meinong paper umbrellas are a traditional industrial art for the Hakka peo

Microsoft Word - Final Exam Review Packet.docx

XHTML width/height bdo a code href object charset codebase hreflang archive lang type alt dir name name xml:lang rel/rev align shape/coords hspace/vsp

Microsoft Word - 武術合併

BC04 Module_antenna__ doc

Microsoft Word - 09王充人性論_確定版980317_.doc

06 01 action JavaScript action jquery jquery AJAX CSS jquery CSS jquery HTML CSS jquery.css() getter setter.css('backgroundcolor') jquery CSS b


Logitech Wireless Combo MK45 English

Epson

<4D F736F F D C4EAC0EDB9A4C0E04142BCB6D4C4B6C1C5D0B6CFC0FDCCE2BEABD1A15F325F2E646F63>

摘 要 張 捷 明 是 台 灣 當 代 重 要 的 客 語 兒 童 文 學 作 家, 他 的 作 品 記 錄 著 客 家 人 的 思 想 文 化 與 觀 念, 也 曾 榮 獲 多 項 文 學 大 獎 的 肯 定, 對 台 灣 這 塊 土 地 上 的 客 家 人 有 著 深 厚 的 情 感 張 氏 於

coverage2.ppt

元代題畫女性詩歌研究

中国的知识分子与民间(社会)

bootstrap - 2

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO

2 SGML, XML Document Traditional WYSIWYG Document Content Presentation Content Presentation Structure Structure? XML/SGML 3 2 SGML SGML Standard Gener

南華大學數位論文

F477

RUN_PC連載_10_.doc

Bus Hound 5

Business Objects 5.1 Windows BusinessObjects 1

Microsoft Word 電子報x

天 主 教 輔 仁 大 學 社 會 學 系 學 士 論 文 小 別 勝 新 婚? 久 別 要 離 婚? 影 響 遠 距 家 庭 婚 姻 感 情 因 素 之 探 討 Separate marital relations are getting better or getting worse? -Exp

<4D F736F F F696E74202D20B5DAD2BBD5C228B4F2D3A1B0E6292E BBCE6C8DDC4A3CABD5D>

Chapter V.S. PC

TX-NR3030_BAS_Cs_ indd

川 外 250 人, 上 外 222 人, 广 外 209 人, 西 外 195 人, 北 外 168 人, 中 南 大 学 135 人, 西 南 大 学 120 人, 湖 南 大 学 115 人, 天 外 110 人, 大 连 外 国 语 学 院 110 人, 上 海 外 事 学 院 110 人,

<4D F736F F D205F FB942A5CEA668B443C5E9BB73A740B5D8A4E5B8C9A552B1D0A7F75FA6BFB1A4ACFC2E646F63>

PowerPoint プレゼンテーション

國立桃園高中96學年度新生始業輔導新生手冊目錄

晶体结构立体模型建构软件-Diamond的使用

ebook193-1

05 01 accordion UI containers 03 Accordion accordion UI accordion 54

Male Circumcision - Traditional Chinese

Male Circumcision - Simplified Chinese

構 築 4 列 牌 陣 從 剩 餘 的 牌 庫 頂 抽 4 張 牌, 面 朝 上 排 列 在 桌 子 中 央 這 4 張 牌 就 是 牌 陣 的 起 始 牌, 包 括 這 張 起 始 牌 在 內, 每 一 列 最 多 只 能 容 納 5 張 牌 將 剩 餘 的 牌 暫 時 置 於 一 旁, 在 下

簡報技巧

從詩歌的鑒賞談生命價值的建構

WinMDI 28

Microsoft Word - 11月電子報1130.doc

Microsoft Word - 第四組心得.doc

MODEL COLOR LIST UZ125D2 YMW GRAY YNF RED YRG BLUE 30H WHITE

致 谢 本 人 自 2008 年 6 月 从 上 海 外 国 语 大 学 毕 业 之 后, 于 2010 年 3 月 再 次 进 入 上 外, 非 常 有 幸 成 为 汉 语 国 际 教 育 专 业 的 研 究 生 回 顾 三 年 以 来 的 学 习 和 生 活, 顿 时 感 觉 这 段 时 间 也

中國飲食色彩初探

软件测试(TA07)第一学期考试

大漠 伪前端, 就职于淘宝

(Microsoft Word - 10\246~\253\327\262\304\244@\264\301\256\325\260T_Version4)

Microsoft Word - 論文封面 修.doc

Microsoft PowerPoint - Lecture7II.ppt

一 -50-

untitled

VASP应用运行优化

穨control.PDF

Pneumonia - Traditional Chinese

A Community Guide to Environmental Health

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc

從篤加有二「區」談當代平埔文化復振現相

Microsoft Word - No_HK doc

臺 灣 圖 書 館 管 理 季 刊 第 五 卷 第 二 期 / 98 年 4 月 only a small part can be seen. Literature creation is just like iceberg floating on the sea, readers can only

ebook70-13

ENGG1410-F Tutorial 6

99 學年度班群總介紹 第 370 期 班群總導 陳怡靜 G45 班群總導 陳怡靜(河馬) A 家 惠如 家浩 T 格 宜蓁 小 霖 怡 家 M 璇 均 蓁 雴 家 數學領域 珈玲 國燈 英領域 Kent

Microsoft PowerPoint - AWOL - Acrobat Windows Outlook.ppt [Compatibility Mode]

32 戲劇學刊 A Study of Beijing Opera s Jing Actors and Their Vocal Accents in the Early Twentieth Century Using Two Operas, Muhuguan and Yuguoyuan, as Exa

User’s Manual

Product Type Batteries (only) Circuit Breatkers & Load Protection Connection Devices Contactors Ethernet Switches, Stratix Switches I/O Modules; PLC N

Microsoft PowerPoint - Aqua-Sim.pptx

Microsoft Word - 21_HTML實力養成暨評量.doc

WFC40810

CONTENT / 003 Part One / 010 / 019 / 032 Part Two O / 0 A / 0 B / 110 AB / 10

Transcription:

HTML(3) 高雄大學資工系 嚴力行 HTML Tables Purposes of using tables The obvious purpose of arranging information in a table The less obvious - but more widely used - purpose of creating a page layout with the use of hidden tables 1

The Table Elements Eachtable tag pair<table></table> can hold any number of table rows Eachtablerow tag pair<tr></tr> can hold any number of table data items Eachtable head tag pair<th></th> has a different appearance than table data Eachtable data tag pair<td></td> can hold text, images, and other HTML elements Typical Table Sketch Code <table> <caption>sample Table</caption> <tr> <th>headrowcol1</th> <th>headrowcoln</th> </tr> <tr> <td>row1- col1</td> 2

Table Cells A table cell is another name for a table data<td> element A browser displays a cell only if it contains something Enter a nonvisible character to display the cell ( ) <tr> <td>rowm-col1</td> <td> </td> <td></td> <td>rowm-coln</td> </tr> 第三個 row 的 html 碼 沒有任何內容! 沒有 cell Attributes of Table Cells Tables cells can be distinguished by background colors -bgcolor Patterns -background alignment align, valign type fonts etc Example: tablecell.html 文字的垂直對齊 3

<td height="225"> <p align="center"><img border="0" src="lhyen.jpg" width="182" height="225"></p> 圖片當作格子的前景 </td> 文字向下對齊圖片當作格 <td background="te02.jpg" align=center valign="bottom"> 子的背景 <font face="arial" size="6"><b>cell with a background pattern</b></font> </td> table Tag Attributes align values: left, center, right default: left A better method is to embed the table in a <div> bgcolor, background border values: n (an integer) default: 0 width value: n(an integer), or n% 4

table Tag Attributes(cont d) cellpadding margin between cell content and cell border default: 2 cellspacing space between adjacent cells default: 2 A Note You can center HTML elements on a Web page by embedding them inside a single-celled table with attributealign set to center Aborder= 5 table attribute creates a 3-D picture frame for a single-celled table containing an image Example: a center framed image singlecell-imge.html 5

colspan androwspan colspan androwspan are table data attributes that are used to create irregular tables A table cell can be extended horizontally with thecolspan attribute A table cell can be extended vertically with therowspan attribute Example: composite example (with both rowspan and colspan) <TR> <TD Colspan="2" ALIGN="CENTER"> <IMG SRC="face.jpg" WIDTH="527" HEIGHT="222"> </TD> </TR> Show face 6

<TR> <TD ROWSPAN="2" ALIGN="CENTER"><IMG SRC="sila3.jpg" WIDTH="247" HEIGHT="602"></TD> <TD ALIGN="CENTER"><IMG SRC="face.jpg" WIDTH="312" HEIGHT="222"> </TD> <TD ROWSPAN="2" ALIGN="CENTER"><IMG SRC="sila1thin.jpg" WIDTH="222" HEIGHT="608"> </TD> </TR> silia3 Show face silia2 sila1thin <TR> <TD ALIGN="CENTER"><IMG SRC="sila2.jpg" WIDTH="267" HEIGHT="334"> </TD> </TR> Rule 1 for Table Elements rowspan= 2 colspan=2 我們可以在整齊的方格上劃箭頭表示 rowspan 與 colspan 所佔用的格子 Row 中 TD 個數的算法 先算沒有被箭頭劃過的 cell 數 再加上屬於箭頭起點的 cell 數 上圖第一個 row 有幾個 TD? 2 個上圖第二個 row 有幾個 TD? 2 個 7

Rule 2 for Table Elements 任何位於向下箭頭起點的 cell, 其 TD 標籤中應有 rowspan, 其值為向下箭頭所劃過的 cell 數 第一個 row 的第一個 cell 值為 2 上圖第幾個 row 的第幾個 cell 該設 rowspan? 值為多少? Rule 3 for Table Elements 任何位於向右箭頭起點的 cell, 其 TD 標籤中應有 colspan, 其值為向右箭頭所劃過的 cell 數 上圖第幾個 row 的第幾個 cell 該設 colspan? 值為多少? 第一個 row 的第二個 cell 值為 2 8

Practice: colspan 與 rowspan 下圖中每個 row 中各有多少 cell? 那些 cell 該設 rowspan? 值為多少? Row 1 Row 2 Table 應用 : 使文字從背景中突顯 Text is hard to read against a busy background pattern you can lay a table containing text on top of a background pattern without sacrificing readability just give the table a solid background color Examples: table_text2.html vs. table_text1.html 9

Table 應用 : 將文字分成兩欄 Tables can also be used to separate text into two columns acellpadding= 20 table attribute will put white space between the two columns Example: table_2col.html Tables and Graphics Tables can be used to control a Web page layout for multiple images (or images mixed with text) Images of different sizes can be fit together in irregularly-shaped tables using cell-structure diagrams All tables have an underlying cell structure with a uniform number of table cells across each table row 10

Web Page Borders Empty table columns can be used to create margins for text on a Web page Use a fixed width attribute (e.g.width= 50 ) for the empty table data element Put an internal table inside Example: innertable.html Note: better to control margins with CSS <center> <table border=1 width=70%> </center> 11

One vs. Many If you have one very large table, try to break it up into a sequence of smaller tables that can be stacked vertically on a Web page Browsers download the contents of an entire table before any of the table can be viewed Multiple tables will be displayed incrementally so the user will be able to see the first part of your page while the rest of the page is still downloading Disadvantages of tables for layout Complex layout requires complex tables (lots of headaches, room for error) Complex tables can download, be rendered slowly Scalability issues Not all browsers can read tables 12