HTML text formatting
Instance
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文网(php.cn)</title> </head> <body> <b>加粗文本</b><br><br> <i>斜体文本</i><br><br> <code>电脑自动输出</code><br><br> 这是 <sub> 下标</sub> 和 <sup> 上标</sup> </body> </html>
Run Instance»
Click the "Run Instance" button View online examples
HTML formatting tags
HTML Use the tags <b> and <i> to format the output text, such as: Bold Italic or Italic
These HTML tags are called formatting tags (see the complete tag reference manual at the bottom, and also check the HTML Programming Dictionary).
#Normal tag <strong> is used instead of bold tag <b>, <em> is used instead of < ;i> tag is used. However, the meanings of these tags are different: <b> vs. <i> define bold or italic text. <strong> or <em> means that the text you want to present is important, so highlight it. All major browsers today can render fonts in a variety of effects. However, future browsers may support better rendering. |
Tag | Description | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
##<b> | Define bold text||||||||||||
Define emphasized text | ||||||||||||
Definition italics | ##<small> | |||||||||||
Definition of small characters | <strong> | |||||||||||
Definition of emphasis | <sub> | |||||||||||
Define subscript | <sup> | |||||||||||
Definition of superscript characters | ##<ins> | |||||||||||
<del> | ||||||||||||
Description | |
---|---|
Define computer code | |
Define keyboard code | |
Definition of computer code sample | |
Define variables | ##<pre> |
Define preformatted text | HTML Citation, Quote, and Tag Definition |