標籤:
內嵌元素,與別人公用一行,但是設定寬高無效。其特點:
①和其他元素都在一行上; ②高,行高及外邊距和內邊距不可改變; ③寬度就是它的文字或圖片的寬度,不可改變 ④內嵌元素只能容納文本或者其他內嵌元素代碼如下:
1 <!doctype html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>標籤基礎2</title> 6 </head> 7 <body> 8 <!-- 內嵌元素 與別人公用一行 但是設定寬高無效 --> 9 10 <!-- 無語義 -->11 <span>無語義</span>12 13 <!-- 圖片 alt圖片載入失敗顯示-->14 <img src="d" alt="載入失敗">15 16 <!-- 超連結 -->17 <a href="http://www.baidu.com">跳轉</a>18 19 <!-- 斜體強調 -->20 <var>斜體強調作用</var>21 <!-- em和i經常用於製作小表徵圖 -->22 <em>斜體強調作用</em>23 <i>斜體強調作用</i>24 25 <!-- 加粗強調 -->26 <strong>加粗強調</strong>27 28 <!-- 表單 提交資料-->29 <form action="">30 <!-- 輸入框 -->31 <input type="text">32 <!-- 密碼輸入框 -->33 <input type="password">34 <!-- 按鈕 -->35 <input type="button" value="按鈕">36 <!-- 提交表單 -->37 <input type="submit" value="提交表單">38 39 <!-- 日期 年月日-->40 <input type="date">41 <!-- 日期 年周 -->42 <input type="week">43 <!-- 日期 年月 -->44 <input type="month">45 <!-- 日期 目前時間 -->46 <input type="time">47 48 <!-- 選擇檔案 -->49 <input type="file" value="開啟檔案">50 <!-- 只能輸入數字 -->51 <input type="number">52 <!-- 顏色選取器 -->53 <input type="color">54 <!-- 重設 -->55 <input type="reset">56 <!-- 複選框 -->57 <input type="checkbox">我愛你58 <input type="checkbox">你愛我59 <!-- 單選框 name 同名字為一組-->60 <input type="radio" name="sex" checked="checked">男61 <input type="radio" name="sex">女62 </form>63 64 <!-- 多行文本 cols寬度 rows高度 -->65 <textarea name="" id="" cols="30" rows="10"></textarea>66 67 <!-- 挑選清單 預設第一個選項的值為初始值-->68 <select name="" id="">69 <option value="">選項1</option>70 <option value="">選項2</option>71 <option value="">選項3</option>72 </select>73 </body>74 </html>
HTML5進階段內聯標籤匯總(小篇)