class 與 id 的值在 **HTML 與 XHTML** 中**均區分大小寫**.header、#main-content、.btn-primary.nav-item、#user-profile.navItem ❌ → .nav-item ✅.error-message 優於 .red-text<!-- HTML -->
<div class="MyClass">內容</div>
/* CSS */
.myclass { color: red; } /* ❌ 無法匹配,大小寫不一致 */
.MyClass { color: red; } /* ✅ 正確 */
selector-class-pattern 強制命名慣例npm run lint:css 防止不合規程式碼合併堅持**小寫 + 連字號**命名慣例,能消除跨瀏覽器、跨團隊的大小寫混淆問題,是專案長期維護的基石。