HTML 顯示特殊字元與符號編碼

HTML為了要顯示特殊字元,而非解析成保留字或標籤,如 陳大德<youraccount@yourmail.com>,會無法顯示正確,故要用特殊符號替代或是利用PHP內有htmlentities() 函數轉換。w3c shcool列舉很多,筆者僅列出常用的:
#---------               name                number           其他方式
留空白                  &nbsp;                &#160             <pre> </pre>
<                            &gt;                     &#60
>                            &lt;                      &#62  
&                           &amp;                 &#38
"                            &quot;                &#34;
'                             &apos;                 &#39;
©                          &copy;
newline                 &NEWLine;          &#10;
Tab                        &Tab;                  &#9;

組合字元 比如數學用字須結合特殊字元
#---------       character                construct                   
'                            a                           a&#769;
~                           a                           a&#771;

數學字元
∀                       &forall;                  &#8704;
 ∂                      &part;                    &#8706;
∃                       &exist;                   &#8707;
∅                       &empty;               &#8709;
∈                      &isin;                     &#8702;
 ∋                     &ni;                        &#8715;
∏                       &pord;                  &#8719;
∑                       &sum;                   &#8721;
Δ                        &Delta;                  &#916;
←                       &larr;                     &#8592;
→                       &rarr;                     &#8594;
↑                       &uarr;                    &#8593;
↓                       &darr;                    &#8595;
∞                       &infin;                   &#8734;
∧                       &and;                    &#8743;
∨                       &or;                       &#8744
 ∩                      &cap;                    &#8745;
∪                       &cup;                    &#8746;
≅                       &cong;                  &#8773;
≈                       &asymp;                &#8776;
≠                       &ne;                      &#8800;
 ≡                      &equiv;                &#8801;
≤                       &le;                      &#8804;
 ≥                      &ge;                      &#8805;
 ⊂                      &sub;                   &#8834;
⊃                       &sup;                   &#8835;


遊戲相關
♠                     &spades;               &#9824;
♣                     &clubs;                  &#9827;
♥                    &hearts;                 &#9829;
♦                     &diams;                 &#9830;

更多資訊請參考原始資料
https://dev.w3.org/html5/html-author/charref
 
https://www.w3schools.com/html/html_entities.asp

https://www.w3schools.com/html/html_symbols.asp
數學表達式
https://www.w3schools.com/charsets/ref_utf_math.asp

這個網誌中的熱門文章

Upgrade php and httpd(apache) on CentOS 7

Installing VMware workstation pro on Ubuntu 22.X (Jammy Jellyfish)