前端面試之HTML5新增加了那些標籤和屬性【未整理】?!
阿新 • • 發佈:2020-12-16
HTML5新增加了那些標籤!
<header>我是H5新增的頭部標籤</header> <nav>我是H5新增的導航標籤</nav> <article>我是H5新增的內容標籤</article> <section>我是H5新增的定義文件某個內容的標籤</section> <aside>我是H5新增的側邊欄標籤</aside> <footer>我是H5新增的尾部標籤</footer> <!-- 視訊標籤 --> controls控制檯 autoplay自動播放 muted靜音播放 loop 迴圈播放 poter 等待畫面 <video src="./media/mi.mp4" controls autoplay muted loop poster="./media/mi9.jpg"></video> <!-- 音訊標籤 --> <audio src="./media/music.mp3" controls autoplay muted loop >sdasd</audio> <!-- 新增input表單屬性 --> 郵箱:<input type="email" name="" id=""> 網址:<input type="url" name="" id=""> 日期: <input type="date" name="" id=""> 時間: <input type="time" name="" id=""> 數量: <input type="number" name="" id=""> 手機號碼: <input type="tel" name="" id=""> 搜尋: <input type="search" name="" id=""> 顏色: <input type="color" name="" id=""> 進度條:<li><input type="range" name="" id="" max="100" min="0" step="10"></li> <!-- 新增input表單屬性 --> required 必填項 value placeholder佔位符 autofocus自動獲取輸入框焦點 autocomplete 記錄輸入記錄(預設是關閉的) <input type="text" required placeholder="請輸入你的姓名" autofocus autocomplete="off" class="ipt" name="lvhang"> multiple 選擇多個檔案 <input type="file" name="" id="" multiple> 提交表單:<input type="submit" value="提交">