« Quay lại Blog

Ký tự HTML - Danh sách HTML icon và Entity Code

3 tháng trước · 290 lượt xem

Có một số ký tự hay còn gọi là ký hiệu chúng ta không thể nhập trực tiếp qua bàn phím. Trong HTML, những ký tự này được gọi là "HTML Entity" hoặc ký tự dành riêng (reserved characters).

Ví dụ, có vài trường hợp bạn muốn nhập ký tự lớn hơn (>) hoặc nhỏ hơn (<) trong khi đang làm việc trên HTML của một website.

Nếu bạn nhập lớn hơn là (>), nó sẽ được xem là thẻ đóng, còn nếu bạn nhập nhỏ hơn là (<), thì nó sẽ được xem như là thẻ mở. 

Để nhập những ký tự này, bạn phải sử dụng HTML Entity. Đây cũng là lý do tại tao tôi đã tổng hợp toàn bộ danh sách các thực thể HTML đã được W3C chấp thuận tại đây. 

Làm sao để sử dụng HTML Entity

Để sử dụng những thực thể dược cung cấp trong bài viết này, bạn hãy copy tên thực thể hoặc code HTML của thực thể đó, dán trực tiếp vào trong file HTML.

Nếu bạn đang sử dụng các tên thực thể, hãy đảm bảo rằng chúng được đặt trước dấu "và" (&) và theo sau là dấu chấm phẩy (;). Ví dụ: &gt; sẽ giúp bạn tạo ký hiệu lớn hơn (>).

Nếu bạn đang sử dụng code HTML để nhập các thực thể, hãy chắc chắn là chúng được đặt trước dấu (&) và dấu (#), và theo sau là dấu chấm phẩy (;). Ví dụ: &#62; để tạo kí hiệu lớn hơn.

Trong một số trường hợp, trình duyệt có thể không nhận dạng được tên thực thể, vì vậy cách tốt nhất là bạn hãy kết hợp với HTML code cho các thực thể. 

Danh sách HTML icon và Entity Code

NAME ENTITY HTML CODE RESULTING SYMBOL
Mathematics Symbols      
Plus Sign &plus; &#43; +
Minus Sign &minus; &#8722;
Multiplication Sign &times; &#215; ×
Division Sign &divide; &#247; ÷
Equals Sign &equals; &#61; =
Not Equal Sign &ne; &#8800;
Plus or Minus Sign &plusmn; &#177; ±
Minus or Plus Sign &mnplus; &#8723;
Not Sign &not; &#172; ¬
Greater Than Sign &gt; &#62; >
Less Than Sign &lt; &#60; <
Greater Than or Equal to &ge; &#8805;
Less Than or Equal to &le; &#8804;
Greater Than Over Equal to &gE; &#8807;
Less Than Over Equal to &lE; &#8806;
Greater Than But not Equal to &gnE; &#8809;
Less Than But not Equal to &lnE; &#8808;
Much Greater Than &Gt; &#8811;
Much Less Than &Lt; &#8810;
Not Greater Than &ngt; &#8815;
Not Less Than &nlt; &#8814;
Neither Greater Than nor Equal to &nge; &#8817;
Neither Less Than nor Equal to &nle; &#8816;
Greater Than or Equivalent to &gsim; &#8819;
Greater Than or Less Than &gl; &#8823;
Less Than or Greater Than &lg; &#8822;
Less than or Greater than &gsim; &#8819;
Neither Less than nor Greater than &ntlg; &#8824;
Neither Greater than nor Less than &ntgl; &#8825;
Degree Sign &deg; &#176; °
Superscript One Sign &sup1; &#185; ¹
Superscript Two Sign &sup2; &#178; ²
Superscript Three Sign &sup3; &#179; ³
Percentage Sign &percnt; &#37; %
Small Letter F With Hook &fnof; &#402; ƒ
There Exists &exist; &#8707;
There Does Not Exist &nexist; &#8708;
Empty Set &empty; &#8709;
Nabla &nabla; &#8711;
Element of &isin; &#8712;
Not an Element of &notin; &#8713;
Summation &sum; #8721
Contains as Member &ni; &#8715;
Does not contain as Member &notni; &#8716;
Dot Plus &plusdo; &#8724;
Asterik &lowast; &#8727;
Setminus &setminus; &#8726;
Square Root &radic; &#8730;
Infinity &infin; &#8734;
Angle &ang; &#8736;
Measured Angle &angmsd; &#8737;
Spherical Angle &angsph; &#8738;
Right Angle &angrt; &#8735;
Divides &mid; &#8739;
Does not Divide &nmid; &#8740;
Parallel to &parallel; &#8741;
Not Parallel to &npar; &#8742;
Logical And &and; &#8743;
Logical Or &or; &#8744;
Intersection &cap; &#8745;
Union &cup; &#8746;
Integral &int; &#8746;
Double Integral &Int; &#8748;
Triple Integral &iiint; &#8749;
Ratio &ratio; &#8758;
Therefore &there4; &#8756;
Because &because; &#8757;
Colon &Colon; &#8759;
Dot Minus &minusd; &#8760;
Geometric Proportion &mDDot; &#8762;
Tilde &sim &#8764;
Reversed Tilde &bsim &#8765;
Not Tilde &nsim &#8765;
Minus Tilde &esim &#8770;
Asymptotically Equal to &sime &#8771;
Asymptotically Not Equal to &nsime &#8772;
Approximately Equal to &cong; &#8773;
Approximately But Not Actually Equal to &simne; &#8774;
Neither Approximately Nor Actually Equal to &ncong; &#8775;
All Equal to &bcong; &#8780;
Almost Equal to &asymp; &#8776;
Equivalent to &asympeq; &#8781;
Geometrically Equivalent to &bump &#8782;
Geometrically Equal to &eDot; &#8782;
Identical to &equiv; &#8801;
Not Identical to &nequiv; &#8802;
Precedes &pr &#8826;
Succeeds &sc &#8827;
Does not Precede &npr &#8832;
Does not Succeed &nsc &#8833;
Precedes or Equal to &prcue; &#8828;
Succeeds or Equal to &sccue; &#8829;
Precedes or Equivalent to &prsim; &#8830;
Succeeds or Equivalent to &scsim; &#8831;
Subset of &sub; &#8834;
Superset of &sup; &#8835;
Not a Subset of &nsub; &#8836;
Not a Superset of &nsup; &#8837;
Subset of or Equal to &sube; &#8838;
Superset of or Equal to &supe; &#8839;
Multiset Multiplication &cupdot; &#8845;
Multiset Union &uplus; &#8846;
Circled Plus &oplus; &#8853;
Circled Minus &ominus; &#8854;
Circled Times &otimes; &#8855;
Circled Division &osol; &#8856;
Circled Dot &odot; &#8857;
Circled Ring &ocir; &#8858;
Circled Asterisk &oast; &#8859;
Circled Dash &odash; &#8861;
Squared Plus &plusb; &#8862;
Squared Minus &minusb; &#8863;
Squared Times &timesb; &#8864;
Squared Dot &sdotb; &#8865;
Up Tack &perp; &#8869;
Down Tack &top; &#8868;
Left Tack &dashv; &#8867;
Right Tack &vdash; &#8866;
Models &models; &#8871;
Normal Subgroup of &vltri; &#8882;
Contains as Normal Subgroup &vrtri; &#8883;
Normal Subgroup of or Equal to &ltrie; &#8884;
Contains as Normal Subgroup or Equal to &rtrie; &#8885;
Original of &origof; &#8886;
Image of &imof; &#8887;
Dot Operator &sdot; &#8901;
Star Operator &Star; &#8902;
Division Operator &divonx; &#8903;
Bowtie &bowtie; &#8904;
Left Normal Factor Semidirect Product &ltimes;; &#8905;
Right Normal Factor Semidirect Product &rtimes;; &#8906;
Double Subset &Sub; &#8912;
Double Superset &Sup; &#8913;
Double Intersection &Cap; &#8914;
Double Union &Cup; &#8915;
Equal and Parallel to &epar; &#8917;
Less than with Dot &ltdot; &#8918;
Greater than with Dot &gtdot; &#8919;
Very Much Less Than &Ll; &#8920;
Very Much Greater Than &Gg; &#8921;
Not Normal Subgroup of &nltri; &#8938;
Does not Contain as Normal Subgroup &nrtri; &#8938;
Not Normal Subgroup of or Equal to &nltrie; &#8940;
Does not Contain as Normal Subgroup or Equal &nrtrie; &#8941;
Vertical Ellipsis &vellip; &#8942;
Horizontal Ellipsis &ctdot; &#8943;
Up Right Diagonal Ellipsis &utdot; &#8944;
Down Right Diagonal Ellipsis &dtdot; &#8945;
Left Ceiling &lceil; &#89468;
Right Ceiling &rceil; &#89469;
Right Floor &rfloor; &#89470;
Left Floor &lfloor; &#89471;
Left Point Angle Bracket &lang; &#9001;
Right Point Angle Bracket &rang; &#9002;
Element of With Stroke &disin; &#8946;
Element of With Vertical Bar &isinsv; &#8947;
Small Element of With Vertical Bar &isins; &#8948;
Element of With Dot Above &isindot; &#8949;
Element of With Overbar &notinvc; &#8950;
Small Element of With Overbar &notinvb; &#8951;
Fractions      
One Quarter &frac14; &#188; ¼
One Half &frac12; &#189; ½
Three Quarters &frac34; &#190; ¾
One Third &frac13; &#8531;
Two Thirds &frac23; &#8532;
One Fifth &frac15; &#8533;
Two Fifths &frac25; &#8534;
Three Fifths &frac35; &#8535;
Four Fifths &frac45; &#8536;
One Sixth &frac16; &#8537;
Five sixths &frac56; &#8538;
One Eighth &frac18; &#8539;
Three Eighths &frac38; &#8540;
Five Eighths &frac58; &#8541;
Seven Eighths &frac78; &#8542;
Currency Symbols      
Dollar Sign &dollar; &#36; $
Cent Sign &cent; &#162; ¢
Euro Sign &euro; &#8364;
Pound Sign &pound; &#163;
Yen Sign &yen; &#165; ¥
Naira Sign   &#8358;
Rupee Sign   &#8360;
Indian Rupee Sign   &#8377;
Bengali Rupee Sign   &#2546;
Bengali Rupee Sign   &#2547;
Turkish Lira Sign   &#8378;
Bitcoin Sign   &#8383;
Punctuation and Quotation Marks      
Full Stop &period; &#46; .
Comma &comma; &#44; ,
Colon &colon; &#58; :
Semicolon &semi; &#59; ;
Reversed Semicolon &bsemi; &#8271;
Exclamation Mark &excl; &#33; !
Prime &bprime; &#8245;
Reversed Prime &prime; &#8242;
Double Prime &Prime; &#8243;
Triple Prime &trime; &#8244;
Quadruple Prime &qprime; &#8279;
Question Mark &quest; &#63; ?
Number Sign &num; &#35; #
Ampersand &amp; &#38; &
Slash &sol; &#47; /
Backslash &bsol; &#92; \
Left Parenthesis &lpar; &#40; (
Right Parenthesis &rpar; &#41; )
Left Square Bracket &lbrack; &#91; [
Right Square Bracket &rbrack; &#93; ]
Left Curly Brace &lbrace; &#123; {
Right Curly Brace &rbrace; &#125; }
Underscore &lowbar; &#95; _
Backtick &grave; &#96; `
Pipe &vert; &#124; |
Double Pipe &Vert; &#8124;
Hyphen &hyphen; &#8208;
En Dash &ndash; &#8211;
Em Dash &mdash; &#8212;
Horizontal Bar &horbar; &#8213; ―;
Bullet Point &bull; &#8226;
Two Dot Leader &nldr; &#8229;
Horizontal Elipsis &hellip; &#8230;
Hyphen Bullet &hybull; &#8259;
Apostrophe &apos; &#39; '
Quotation Mark &quot; &#39; '
Left Single Quotation Mark &lsquo; &#8216;
Right Single Quotation Mark &rsquo; &#8217;
Right Double Quotation Mark &rdquo; &#8221;
Left Double Quotation Mark &ldquo; &#8222;
Left Pointing Double Angle Quotation Mark &laquo; &#171; '
Right Pointing Double Angle Quotation Mark &raquo; &#187; »
Single Right Pointing Angle Quotation Mark &lsaquo; &#8249;
Single Left Pointing Angle Quotation Mark &rsaquo; &#8250;
Arrows      
Long Rightward Arrow &xrarr; &#10230;
Long Leftward Arrow &xharr; &#10231;
Clockwise Open Circle Arrow &orarr; &#8634;
Anticlockwise Open Circle Arrow &olarr; &#8635;
Leftwards Harpoon With Barb Upwards &lharu; &#8636;
Leftwards Harpoon With Barb Downwards &lhard; &#8637;
Upwards Harpoon With Barb Rightwards &uharr; &#8638;
Upwards Harpoon With Barb Leftwards &uharl; &#8639;
Upwards Harpoon With Barb Leftwards &uharl; &#8639;
Rightwards Harpoon With Barb Upwards &rharu; &#8640;
Rightwards Harpoon With Barb Downwards &rhard; &#8641;
Downwards Harpoon With Barb Rightwards &rharr; &#8642;
Downwards Harpoon With Barb Leftwards &rharl; &#8643;
Leftwards Harpoon Over Rightwards Harpoon &lrhar; &#8651;
Rightwards Harpoon Over Leftwards Harpoon &rlhar; &#8652;
Rightwards Arrow Over Leftwards Arrow &rlarr; &#8644;
Upwards Arrow Beside Downwards Arrow &udarr; &#8645;
Leftwards Arrow Over Rightwards Arrow &lrarr; &#8646;
Double Leftwards Arrow &llarr; &#8647;
Double Upwards Arrow &uuarr; &#8648;
Double Rightwards Arrow &rrarr; &#8649;
Double Downwards Arrow &ddarr; &#8650;
Leftwards Double Arrow &lArr; &#8656;
Rightwards Double Arrow &rArr; &#8658;
Upwards Double Arrow &uArr; &#8657;
Downwards Double Arrow &dArr; &#8659;
Leftwards Double Arrow with Stroke &nlArr; &#8653;
Rightwards Double Arrow with Stroke &nrArr; &#8655;
Left Right Double Arrow &nhArr; &#8660;
Left Right Double Arrow with Stroke &hArr; &#8654; ⇎&