基本格式:
<html>
<head>
<title></title>
</head>
<body></body>
</html>
<html> 所有的標記都要放在這里 </html>
<head> 網頁的頭部 </head>
<title> 網頁的標題 </title>
<body> 網頁的內容 </body>
常用元素
<hn> n為1~6之間的整數 </hn>
<b> 文字加粗 </b>
<br> 用來換行 </br>
<I> 文字傾斜 </I>
<u> 文字底部加上底線 </u>
<DEL> 文字加上刪除線 </DEL>
<TT> 標簽呈現類似打字機或者等寬的文本效果</TT>
<SUP> 將文字設置成上標 </SUP>
<font color="顏色" size="字號" face="字體"> hello,world!</font>
<li> 設置項目 </li>
<p> 段落標記 </p>
<ol type="I">
<li>one
<li>two
</ol>
<DT> 定義項目
<DD>定義資料
水平線:
<hr> 水平線 </hr>
<hr width="120%/400" align="left/center/right" size="10">
表格標記:
<body>
<table width="400" border="1">容器標記
<caption align="center">表格外標題</caption>
<tr>表格中的行
<tr><th colspan="3">表格內標題</th></tr>
<td>lily</td>表格
<td>22</td>
<td>boy</td>
</tr>
<tr>表格中的行
<td>aisa</td>表格
<td>22</td>
<td>girl</td>
</tr>
</table>
</body>
1)表單標記:
<form id="表單的ID名稱" name="表單名稱" method="數據傳送方式:Post/Get" action="">容器</form>
2)單行文本框:
<body>
<form id="form1" name="form1" method="post" action="">
請輸入你的名字:
<input type="text" name="textname" id="textname">
</form>
</body>
3)密碼文本框
<body>
<form id="form1" name="form1" method="post" action="">
請輸入你的名字:
<input type="password" name="password" id="password">
</form>
</body>
4)單選按鈕
<body>
<form id="form1" name="form1" method="post" action="">
請輸入你的名字:
<input type="radio" name="radio" id="radio" value="D1">
</form>
</body>
5)多行文本框和按鈕
<body>
<form id="form1" name="form1" method="post" action="">
多行文本框
<textarea name="Ri" cols="56" rows="10"></textarea>
</br>
<input type="submit" name="Tj" id="Tj" value="提交">
<input type="reset" name="CZ" id="CZ" value="重置">
</form>
</body>
最后編輯于 :
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。