資料來(lái)源:www.w3cschools.com
一、HTML中的實(shí)體(又譯轉(zhuǎn)義字符):
A character entity has three parts: an ampersand (&), an entity name or a # and an entity number, and finally a semicolon (;).
備注:一個(gè)HTML實(shí)體由三部分構(gòu)成:&符號(hào)、實(shí)體名或者一個(gè)#加實(shí)體編碼、分號(hào)
To display a less than sign in an HTML document we must write: < or <
The advantage of using a name instead of a number is that a name is easier to remember. The disadvantage is that not all browsers support the newest entity names, while the support for entity numbers is very good in almost all browsers.
備注:HTML實(shí)體是大小寫(xiě)敏感的 Result Description Entity Name Entity Number non-breaking space < less than < < > greater than > > & ampersand & & " quotation mark " " ' apostrophe ' (does not work in IE) '
二、HTML中顯示多個(gè)空白字符:
Normally HTML will truncate spaces in your text. If you write 10 spaces in your text HTML will remove 9 of them. To add spaces to your text, use the character entity.
三、HTML中的常用實(shí)體:
-------------------------------------------------------------
生活就像打牌,不是要抓一手好牌,而是要盡力打好一手爛牌。