HTML 標籤可擁有「屬性」,以 名稱="值" 形式出現在開始標籤中,提供元素額外資訊。
<a href="https://example.com">連結文字</a> — href 指定目標網址。<h1 align="center">標題</h1><body bgcolor="yellow">(註:HTML5 建議改用 CSS)<table border="1">name='Bill "HelloWorld" Gates'。| 屬性 | 值 | 描述 |
|---|---|---|
class | classname | 指定元素類別名稱 |
id | id | 指定元素唯一識別碼 |
style | style_definition | 定義行內樣式 |
title | text | 額外提示資訊(滑鼠懸停顯示) |