本文轉(zhuǎn)載自:https://zhuanlan.zhihu.com/p/35692098
1.<iframe>標(biāo)簽
一般作為頁面嵌套標(biāo)簽來使用:


更多關(guān)于<iframe>標(biāo)簽的資料請參考MDN:<iframe>
2.<a>標(biāo)簽
a標(biāo)簽是英語anchor的縮寫,也就是錨點的意思。可以聯(lián)想為輪船的船錨(那個大大的鐵東西)。一般來a標(biāo)簽基本是作為超鏈接,錨點來使用。
超鏈接:
<a href="鏈接路徑">文字</a>
a標(biāo)簽里面有4個屬性分別是:_blank _*self *_parent _top
他們主要決定為當(dāng)前設(shè)置鏈接打開窗口的方式:
以_blank為例:


<figcaption style="margin-top: calc(0.666667em); padding: 0px 1em; font-size: 0.9em; line-height: 1.5; text-align: center; color: rgb(153, 153, 153);">點擊_blank,直接新建一個窗口打開</figcaption>
_self:



<figcaption style="margin-top: calc(0.666667em); padding: 0px 1em; font-size: 0.9em; line-height: 1.5; text-align: center; color: rgb(153, 153, 153);">_self:為當(dāng)前窗口打開鏈接</figcaption>
_parent:


<figcaption style="margin-top: calc(0.666667em); padding: 0px 1em; font-size: 0.9em; line-height: 1.5; text-align: center; color: rgb(153, 153, 153);">HTML續(xù)是htmldemo的父元素</figcaption>



_parent屬性必須配合iframe標(biāo)簽使用才能看出效果:
圖一是圖二的父元素,所以是在父元素窗口打開。差不多屬性的還有一個top屬性,_top屬性就是在祖先元素打開,只要捋好了各自之間的元素關(guān)系,相信要使用好這兩個標(biāo)簽并不難。
a標(biāo)簽還有一個錨點的屬性:
錨:錨點的作用是頁面內(nèi)的跳轉(zhuǎn),沒有發(fā)起請求。
<a href="#mao" target="_self">點擊此處到目標(biāo)位置</a>
<a name="mao" target="_self">目標(biāo)位置</a>

<figcaption style="margin-top: calc(0.666667em); padding: 0px 1em; font-size: 0.9em; line-height: 1.5; text-align: center; color: rgb(153, 153, 153);">當(dāng)我點擊:時,就會在當(dāng)前頁面跳轉(zhuǎn)至目標(biāo)位置這一欄。</figcaption>
2:<form>標(biāo)簽:跳轉(zhuǎn)頁面,上傳內(nèi)容
a跳轉(zhuǎn)頁面是get請求,form跳轉(zhuǎn)頁面是post請求。
如果form表單里面沒有提交按鈕,那么你就沒法提交
form標(biāo)簽,主要是用來發(fā)起post請求
你在name上輸出的東西,最終會引入到請求第四部分
firl協(xié)議不支持post
get:獲取內(nèi)容 form:上傳內(nèi)容
一般用于新用戶注冊
3.<input>:
<input> 一般用于為基于Web的表單創(chuàng)建交互式控件,以便接受來自用戶的數(shù)據(jù):
input有眾多屬性,以下就跳最常用的"文本框"屬性來說
圖下的代碼是用input創(chuàng)建一個簡單的文本框:

<figcaption style="margin-top: calc(0.666667em); padding: 0px 1em; font-size: 0.9em; line-height: 1.5; text-align: center; color: rgb(153, 153, 153);">type="text" 一個文本框 value=設(shè)置input里面的初始文字</figcaption>

more:input
4:<button>:
**<button> **表示一個可點擊的按鈕,可以用在表單或文檔其它需要使用簡單標(biāo)準(zhǔn)按鈕的地方。 默認(rèn)情況下,HTML按鈕的顯示樣式接近于 user agent 所在的宿主系統(tǒng)平臺(用戶操作系統(tǒng))的按鈕, 但你可以使用 CSS 來改變按鈕的樣貌。
語法示例:


button與input:
<button>和<input type="button"> 的具體區(qū)別
1、關(guān)閉標(biāo)簽設(shè)置。<input>禁用關(guān)閉標(biāo)簽</input>。閉合的寫法:<input type="submit" value="OK" />。
<button>的起始標(biāo)簽和關(guān)閉標(biāo)簽都是必須的,如 <button>OK</button>。
2、<button>的值并不是寫在value屬性里,而是在起始、關(guān)閉標(biāo)簽之間,如上面的OK。同時<button>的值很廣泛,有文字、圖像、移動、水平線、框架、分組框、音頻視頻等
3、可為button元素添加CSS樣式。
例如,<button style="width:150px;height:50px;border:0;"></button>
其中:width:150px;height:50px; 為按鈕的寬度、高度, 為按鈕的背景色,
border:0; 是去掉默認(rèn)的邊框。
5:<table>:
table 元素表示表格數(shù)據(jù) — 即通過二維數(shù)據(jù)表表示的信息。
<table>的幾個簡單屬性:
tfoot 表腳
tr=table row行
td=數(shù)據(jù) table data,數(shù)據(jù)放在td里面
colgroup=控制列寬度
更多屬性應(yīng)用可參考:<table>

<figcaption style="margin-top: calc(0.666667em); padding: 0px 1em; font-size: 0.9em; line-height: 1.5; text-align: center; color: rgb(153, 153, 153);">以上就是table標(biāo)簽的示例應(yīng)用,可以看作是一個word文檔,橫行tr縱列td,然后設(shè)置border實線</figcaption>