主頁
HTML
塊級與內聯
Tryit: HTML 塊級元素
執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <body> <p style="border: 1px solid black">Hello World</p> <div style="border: 1px solid black">Hello World</div> <p>The P and the DIV elements are both block elements, and they will always start on a new line and take up the full width available (stretches out to the left and right as far as it can).</p> </body> </html>