<table>、<font>、<br> 排版標籤<header>、<main>、<aside>、<footer> 語意標籤.css,HTML 體積縮減 50%+,爬蟲直達內容h1-h6 樣式醜陋 → 用 CSS 重設字體、間距、顏色h1 單一、h2-h6 階層分明,**搜尋引擎權重最高**h1 { font-size: 2.5rem; font-weight: 700; color: #1a1a1a; margin: 1.5rem 0 1rem; }
h2 { font-size: 2rem; font-weight: 600; color: #333; margin: 1.2rem 0 .8rem; }
h3 { font-size: 1.5rem; font-weight: 500; color: #444; margin: 1rem 0 .6rem; }
<a href="#" onmouseover="this.src='btn-over.jpg'" onmouseout="this.src='btn-out.jpg'">
<img src="btn-out.jpg">
</a>
<a class="btn" href="/target">按鈕文字</a>
.btn {
display: inline-block;
width: 120px; height: 40px;
background: url(btn-sprite.png) no-repeat 0 0;
text-indent: -9999px; /* 隱藏文字,保留語意 */
}
.btn:hover { background-position: 0 -40px; }
.btn:active { background-position: 0 -80px; }
CSS 是**分離結構與表現、優化 SEO、提升效能**的最強槓桿。拒絕內聯樣式、拒絕表格佈局、拒絕 JS 做視覺切換——讓 CSS 回歸本職工作。