如何將文字顯示方向包括在 HTML 中?
使用 HTML 中的 dir 屬性,以新增文字方向。
示例
你可以嘗試執行以下程式碼,以在 HTML 中包括文字顯示方向 −
<!DOCTYPE html> <html> <body> <p>This is demo text from left-to-right.</p> <p dir = "rtl">This is demo text from right-to-left.</p> </body> </html>
廣告
使用 HTML 中的 dir 屬性,以新增文字方向。
你可以嘗試執行以下程式碼,以在 HTML 中包括文字顯示方向 −
<!DOCTYPE html> <html> <body> <p>This is demo text from left-to-right.</p> <p dir = "rtl">This is demo text from right-to-left.</p> </body> </html>