如何在 HTML 中設定文字字型?
<font> 標籤用於設定 HTML 中的字型,但現在已棄用。使用 CSS 來實現相同目的。
示例
你可以嘗試執行以下程式碼來更改 HTML 中文字的字型 −
<!DOCTYPE html> <html> <body> <h2>Tutorialspoint</h2> <p>Learning videos</p> <p style = "font-family:'Courier New'">Learning content</p> </body> </html>
廣告