主頁
CSS
CSS 對齊
Tryit: 居中文字
執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> .center { text-align: center; border: 3px solid green; } </style> </head> <body> <h2>Center Text</h2> <div class="center"> <p>This text is centered.</p> </div> </body> </html>