源代碼
點擊運行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>教程</title> </head> <body> <p style="background-color:#FFFF00"> 通過十六進製設置背景顏色 </p> <p style="background-color:rgb(255,255,0)"> 通過 rbg 值設置背景顏色 </p> <p style="background-color:yellow"> 通過顏色名設置背景顏色 </p> </body> </html>
運行結果