HTML是用來開發網頁的,它是開發網頁的語言
全稱HyperText Mark-up Language,超文本標記語言
標記就是標簽
<標簽名稱></標簽名稱> 比如 <html></html> <h1></h1>等,標簽大多數都是成對出現的。
超文本 兩層含義:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>網頁標題</title>
</head>
<body>
網頁顯示內容
</body>
</html>
第一行<!DOCTYPE html>是文檔聲明
用來指定頁面所使用的html的版本, 這里聲明的是一個html5的文檔
<html>...</html>標簽是開發人員在告訴瀏覽器
整個網頁是從<html>這里開始的,到</html>結束
也就是html文檔的開始和結束標簽
<head>...</head>標簽用于定義文檔的頭部
是負責對網頁進行設置標題、編碼格式以及引入css和js文件的
<body>...</body>標簽是編寫網頁上顯示的內容
網頁文件的后綴是.html, 一個html文件就是一個網頁,html文件用編輯器打開顯示的是文本,可以用文本的方式編輯它,如果用瀏覽器打開,瀏覽器會按照標簽描述內容將文件渲染成網頁
VS Code全拼是 Visual Studio Code 是由微軟研發的一款免費、開源的跨平臺代碼編輯器
目前是前端(網頁)開發使用最多的一款軟件開發工具
下載網址: https://code.visualstudio.com/Download
選擇對應的安裝包進行下載:
安裝一切默認
1 標簽不區分大小寫,但是推薦使用小寫
2 根據標簽的書寫形式,標簽分為雙標簽(閉合標簽)和單標簽(空標簽) 2.1 雙標簽是指由開始標簽和結束標簽組成的一對標簽,這種標簽允許嵌套和承載內容,比如: div標簽 2.2 單標簽是一個標簽組成,沒有標簽內容, 比如: img標簽
標簽的使用形式
列表標簽
網頁效果
表格標簽
<table>標簽:表示一個表格
<tr>標簽:表示表格中的一行
<td>標簽:表示表格中的列
<th>標簽:表示表格中的表頭
屬性設置
border: 1px solid black:設置邊框和顏色
border-collapse: collapse:設置邊框合并
網頁效果
表單標簽
表單用于搜集不同類型的用戶輸入的數據,然后可以把用戶數據提交到web服務器
<form>標簽 表示表單標簽,定義整體的表單區域
一個表單中有很多信息組成,比如 姓名,愛好,地址等,這些內容有很多其他標簽來承載
這些標簽稱為表單元素標簽
網頁效果
表單用于搜集不同類型的用戶輸入的數據,然后可以把用戶數據提交到web服務器
兩種方式的區別:
表單元素屬性設置
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<!--
姓名 type="text" 定義單行文本輸入框
密碼 type="password" 定義密碼輸入框
性別 type="radio" 定義單選框
愛好 type="checkbox" 定義復選框
照片 type="file" 定義上傳文件
個人描述 <textarea></textarea> 定義多行文本輸入框
地址 <select></select> 定義下拉列表
提交 type="submit" 定義提交按鈕
重置 type="reset" 定義重置按鈕
按鈕 type="button" 定義一個普通按鈕
-->
<form action="http://192.168.1.106:8080" method="POST">
<label>姓名:</label>
<input type="text" name="username" >
<br>
<label>密碼:</label>
<input type="password" name="password">
<br>
<label>性別:</label>
<input type="radio" name="sex" value="1">男
<input type="radio" name="sex" value="0">女
<br>
<label>愛好:</label>
<input type="checkbox" name="like" value="睡覺">睡覺
<input type="checkbox" name="like" value="吃飯">吃飯
<input type="checkbox" name="like" value="打豆豆">打豆豆
<br>
<label>照片:</label>
<input type="file" name="pic">
<br>
<label>個人描述:</label>
<textarea name="desc"></textarea>
<br>
<label>地址:</label>
<select name="addr">
<option value="1">北京</option>
<option value="2">上海</option>
<option value="3">廣州</option>
<option value="4">深圳</option>
</select>
<br>
<input type="submit" value="提交">
<input type="reset" value="重置">
<input type="button" value="按鈕">
</form>
</body>
</html>
點擊提交:
可以看到服務器收到了請求報文。
理了23個跟傳統歷史文化有關的網站,千萬不要錯過~
1.故宮博物院藏品總目:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=https%253A%252F%252Fzm-digicol.dpm.org.cn%252F&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:https%3A//zm-digicol.dpm.org.cn/}
2.漢典古籍:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=http%253A%252F%252Ft.cn%252FGt1aM&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:http%3A//t.cn/Gt1aM}
3.中國古籍網:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=https%253A%252F%252Fc.pc.qq.com%252Fmiddlem.html%253Fpfurl%253Dhttp%25253A%25252F%25252Ft.cn%25252FzOqoclW%2526gjsublevel%253D2804%2526pfuin%253D83781672%2526pfto%253Dmqq.qzone%2526type%253D0%2526gjlevel%253D15&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:https%3A//c.pc.qq.com/middlem.html?pfurl=http%253A%252F%252Ft.cn%252FzOqoclW&gjsublevel=2804&pfuin=83781672&pfto=mqq.qzone&type=0&gjlevel=15}
4.中國歷史地圖集:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=http%253A%252F%252Ft.cn%252FzOZ8DRT&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:http%3A//t.cn/zOZ8DRT}
5.中國傳統顏色網站:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=http%253A%252F%252Fzhongguose.com%252F&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:http%3A//zhongguose.com/}
6.歷代詩人地域分布:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=http%253A%252F%252Ft.cn%252FESIy0mp&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:http%3A//t.cn/ESIy0mp}
7.中國歷代人物圖像數據庫:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=http%253A%252F%252Ft.cn%252FzOZns18&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:http%3A//t.cn/zOZns18}
8.中國地方志數據庫:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=http%253A%252F%252Flcd.ccnu.edu.cn%252F%2523%252Findex&src_uin=2941347079&src_scene=7035&cli_scene=getDetail#/index,text:http%3A//lcd.ccnu.edu.cn/#/index}
9.國學導航:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=https%253A%252F%252Fc.pc.qq.com%252Fmiddlem.html%253Fpfurl%253Dhttp%25253A%25252F%25252Ft.cn%25252FRyhWagD%2526gjsublevel%253D2804%2526pfuin%253D83781672%2526pfto%253Dmqq.qzone%2526type%253D0%2526gjlevel%253D15&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:https%3A//c.pc.qq.com/middlem.html?pfurl=http%253A%252F%252Ft.cn%252FRyhWagD&gjsublevel=2804&pfuin=83781672&pfto=mqq.qzone&type=0&gjlevel=15}
10.古籍館:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=https%253A%252F%252Fwww.gujiguan.com%252F&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:https%3A//www.gujiguan.com/}
11.中醫古籍全文數據庫:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=http%253A%252F%252Ft.cn%252FRLXw2ko&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:http%3A//t.cn/RLXw2ko}
12.全歷史:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=https%253A%252F%252Fwww.allhistory.com%252F&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:https%3A//www.allhistory.com/}
13.國學大師:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=http%253A%252F%252Fwww.guoxh&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:http%3A//www.guoxh}ttp://t.cn/A6q84dGA
14.中國京劇戲考:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=http%253A%252F%252Ft.cn%252FA6q84dGA&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:http%3A//t.cn/A6q84dGA}
15.書法空間:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=http%253A%252F%252Ft.cn%252FRxQPAqc&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:http%3A//t.cn/RxQPAqc}
16.發現中國:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=http%253A%252F%252Ft.cn%252FRYI2Iaj&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:http%3A//t.cn/RYI2Iaj}
17.中國歷史學習網:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=http%253A%252F%252Ft.cn%252FA6ICUI2U&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:http%3A//t.cn/A6ICUI2U}
18.讀典籍:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=http%253A%252F%252Ft.cn%252FA655he6S&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:http%3A//t.cn/A655he6S}
19.古今文字集成:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=https%253A%252F%252Fc.pc.qq.com%252Fmiddlem.html%253Fpfurl%253Dhttp%25253A%25252F%25252Ft.cn%25252FRLdkvFV%2526gjsublevel%253D2804%2526pfuin%253D83781672%2526pfto%253Dmqq.qzone%2526type%253D0%2526gjlevel%253D15&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:https%3A//c.pc.qq.com/middlem.html?pfurl=http%253A%252F%252Ft.cn%252FRLdkvFV&gjsublevel=2804&pfuin=83781672&pfto=mqq.qzone&type=0&gjlevel=15}
20.歷史劇里看歷史:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=http%253A%252F%252Ft.cn%252F8kIgi9a&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:http%3A//t.cn/8kIgi9a}
21.成語查詢:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=http%253A%252F%252Ft.cn%252FhRDRm&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:http%3A//t.cn/hRDRm}
22.搜韻:{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=https%253A%252F%252Fwww.sou-yun.cn%252F&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:https%3A//www.sou-yun.cn/}
23.唐宋文學編年地圖 :{url:https%3A//www.urlshare.cn/umirror_url_check?_wv=1&srctype=touch&apptype=android&loginuin=3021168867&plateform=mobileqq&url=https%253A%252F%252Fsou-yun.cn%252FMPoetLifeMap.aspx&src_uin=2941347079&src_scene=7035&cli_scene=getDetail,text:https%3A//sou-yun.cn/MPoetLifeMap.aspx}
「整理不易 路過的伙伴們點個贊 喜歡的關注收藏轉發」
*請認真填寫需求信息,我們會在24小時內與您取得聯系。