This article brings you a simple example of HTML text formatting (detailed explanation). I hope that after learning this, everyone will be able to master the knowledge of HTML text formatting and use it better.
1. Text formatting: This example demonstrates how to format text in an HTML file.
<html> <body> <b>This text is bold</b> <br /> <strong>This text is strong</strong> <br /> <big>This text is big</big> <br /> <em>This text is emphasized</em> <br /> <i>This text is italic</i> <br /> <small>This text is small</small> <br /> This text contains <sub>subscript</sub> <br /> This text contains <sup>superscript</sup> </body> </html>
2. Preformatted text: This example demonstrates how to use the pre tag to control blank lines and spaces.
<html> <body> <pre class="brush:php;toolbar:false"> 这是 预格式文本。 它保留了 空格 和换行。
pre 标签很适合显示计算机代码:
for i = 1 to 10 print i next i