web實驗一

實驗內容:

一、實驗目的:
掌握HTML語言標記
掌握HTML元素的的基本結構
學習使用文本編輯器創建HTML文檔
理解文本編碼的作用與意義


實驗內容:
創建HTML文檔
定義title
定義字符編碼爲UTF-8
定義關鍵詞與描述
定義一個標題
定義一個段落
在段落內定義使用上標定義顯示X^2
定義一個外聯的超鏈接
聲明一個內部超鏈接錨點,並定義一個鏈接
定義一個圖像的引用
定義一個跨行的表格
定義一個跨列的表格


如何使用文本編輯器創建HTML文檔
創建txt文檔
添加HTML代碼
另存爲HTML文檔
使用瀏覽器運行HTML文件查看結果
右鍵創建txt文檔,在txt文本文件中添加HTML代碼;將文件另存爲HTML文檔,選擇編碼爲UTF-8

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>$</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="Content-Language" content="zh-CN" />
	<meta name="Keywords" content="" />
	<meta name="Description" content="" />
	<link rel="stylesheet" href="style/$.css" type="text/css" />
</head>
<body>
<!-- <title> title </title> -->
<h1><a name = "TOP"> h1 </a></h1>
<h2>h2</h2>
<h3>h3</h3>
<h4>h4</h4>
<h5>h5</h5>
<h6>h6</h6>
body
<p> ppppppp </p>
<p> x<sup>2 </p>
<p> ppppppppppppppppppppp </p>
<a href="http://www.w3school.com.cn/" target="_blank">Visit W3School!</a>
<p>
<a href="#TOP">TOP</a>
</p>
<img src = "d:\a.jpg">

<h4>橫跨兩列的單元格:</h4>
<table border="1">
<tr>
  <th>姓名</th>
  <th colspan="2">電話</th>
</tr>
<tr>
  <td>Bill Gates</td>
  <td>555 77 854</td>
  <td>555 77 855</td>
</tr>
</table>

<h4>橫跨兩行的單元格:</h4>
<table border="20">
<tr>
  <th>姓名</th>
  <td>Bill Gates</td>
</tr>
<tr>
  <th rowspan="2">電話</th>
  <td>555 77 854</td>
</tr>
<tr>
  <td>555 77 855</td>
</tr>
</table>

</body>
</html>


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章