head標籤訂義的東西不顯示出來,樣式、編碼之類的
title標籤設置網站的頁面文件的標題(網站名)
meta 中chaeset用來聲明網頁編碼
body標籤訂義的爲顯示內容
input標籤用於定義輸入框
button標籤用於定義按鈕
span標籤會使組裏的元素保持在同一行
br至關於網頁上的回車(換行)
<!-- 例子 -->:這是HTML的註釋css
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Dome</title> <style> .radio-button { display: inline-block; padding: 10px; cursor: pointer; } .active { background: red; } </style> </head> <body> <!-- 注意, 每一個標籤都有 class 和 id 這兩個屬性 --> <!-- class 能夠重複, id 不能重複 --> <div class=login-form> <input id=id-input-username type="text" value="mengxin"> <br> <input id="id-input-password" type="password" value="mengxin"> <br> <button id="id-button-login">登陸按鈕</button> </div> <!-- 這是一個選項卡的例子 --> <div class="radio-control"> <!-- 能夠設置多個 class, 用空格分開 --> <span class="radio-button active">html</span> <span class="radio-button">js</span> <span class="radio-button">css</span> </div> <!-- --> </body> </html>