Difference between revisions of "HTML entity"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
m (→‎Overview: quotes around format)
(→‎Entities by Number: formatting improvements; :"by appearance" section)
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Overview==
+
<hide>
[[category:computing terminology]]An [[HTML entity]] is a combination of characters which will be displayed within an [[HTML]] browser as a single character. All HTML entities begin with "&amp;" (ampersand) and end with ";" (semicolon). Many entities have mnemonic names (such as "&amp;amp;", which displays an ampersand); any possible character can be displayed as an entity by using the format "&amp;#<u>number</u>;" where <u>number</u> is the output character's [[ASCII]] value in decimal.
+
[[page type::article]]
 +
[[page type::reference]]
 +
[[thing type::character format]]
 +
[[category:computer terminology]]
 +
</hide>
 +
==About==
 +
An [[HTML entity]] is a combination of characters which will be displayed within an [[HTML]] browser as a single character. All HTML entities begin with "&amp;" (ampersand) and end with ";" (semicolon). Many entities have mnemonic names (such as "&amp;amp;", which displays an ampersand); any possible character can be displayed as an entity by using the format "&amp;#<u>number</u>;" where <u>number</u> is the output character's [[ASCII]] value in decimal.
  
 +
''see also: [[wikipedia:Percent-encoding]]''
 
==Reference==
 
==Reference==
 
* {{wikipedia|Character entity reference}}
 
* {{wikipedia|Character entity reference}}
 
* [http://htmlhelp.com/reference/html40/entities/ HTML 4.0 entities]
 
* [http://htmlhelp.com/reference/html40/entities/ HTML 4.0 entities]
 +
* [https://developers.whatwg.org/named-character-references.html#named-character-references Named character references], in alphabetical order, including newer ones not supported by most browsers
 +
* [https://www.freeformatter.com/html-entities.html HTML Entity List]: "Complete list of HTML entities with their numbers and names. Also included is a full list of ASCII characters that can be represented in HTML (i.e. printable characters)."
 +
 +
==Questions==
 +
* Does [[Google]] resolve html entities when indexing web pages? That is, if I spelled a word (e.g. "schmerglefrotz") entirely using html entities, would someone be able to find that page using google by typing "schmerglefrotz" (after the site had been spidered, of course)? (As a test, I will spell a completely different word using HTML entities, and try Googling it later: '''&#70;&#82;&#69;&#76;&#71;&#75;&#76;&#79;&#84;&#90;''')
 +
** '''2007-07-15 answer''': Yes, it does find it (though it took several months at least before this page got indexed).
 +
** '''2016-11-28 answer''': Searching for the word in question no longer produces any results. Neither does searching for "schmerglefrotz".
 +
 +
==Note==
 +
* '''2017-11-11''' MediaWiki 1.28.0 apparently no longer supports the "&amp;#d;" style of entity; you now have to use named entities.
 +
* '''2020-05-23''' This seems to have been fixed?
 +
 +
==Entities by Number==
 +
* 0-8 are not translated
 +
* 9 is probably TAB
 +
* 10 is probably [[linefeed|LF]]
 +
* 13 is probably [[carriage return|CR]]
 +
* 14-31 are not translated
 +
* 32 is a standard space
 +
{| width=100%
 +
! colspan=3 style="border-bottom: 1px solid blue;" | lower ASCII || colspan=4 style="border-bottom: 1px solid green;" | upper ASCII
 +
|-
 +
| style="border:#0d0 1px solid; padding: 2px;" |
 +
{|
 +
{{show/entity/row|#33}}
 +
{{show/entity/row|#34}}
 +
{{show/entity/row|#35}}
 +
{{show/entity/row|#36}}
 +
{{show/entity/row|#37}}
 +
{{show/entity/row|#38}} {{show/entity|amp}}
 +
{{show/entity/row|#39}}
 +
{{show/entity/row|#40}}
 +
{{show/entity/row|#41}}
 +
{{show/entity/row|#42}}
 +
{{show/entity/row|#43}}
 +
{{show/entity/row|#44}}
 +
{{show/entity/row|#45}}
 +
{{show/entity/row|#46}}
 +
{{show/entity/row|#47}}
 +
{{show/entity/row|#48}}
 +
{{show/entity/row|#49}}
 +
{{show/entity/row|#50}}
 +
{{show/entity/row|#51}}
 +
{{show/entity/row|#52}}
 +
{{show/entity/row|#53}}
 +
{{show/entity/row|#54}}
 +
{{show/entity/row|#55}}
 +
{{show/entity/row|#56}}
 +
{{show/entity/row|#57}}
 +
{{show/entity/row|#58}}
 +
{{show/entity/row|#59}}
 +
{{show/entity/row|#60}}
 +
{{show/entity/row|#61}}
 +
{{show/entity/row|#62}}
 +
{{show/entity/row|#63}}
 +
{{show/entity/row|#64}}
 +
|}
 +
 +
| style="border:#0d0 1px solid; padding: 2px;" |
 +
 +
{|
 +
|-
 +
| &#65;  || &amp;#65;
 +
|-
 +
| &#66; || &amp;#66;
 +
|-
 +
| &#67; || &amp;#67;
 +
|-
 +
| &#68; || &amp;#68;
 +
|-
 +
| &#69; || &amp;#69;
 +
|-
 +
| &#70; || &amp;#70;
 +
|-
 +
| &#71; || &amp;#71;
 +
|-
 +
| &#72; || &amp;#72;
 +
|-
 +
| &#73; || &amp;#73;
 +
|-
 +
| &#74; || &amp;#74;
 +
|-
 +
| &#75; || &amp;#75;
 +
|-
 +
| &#76; || &amp;#76;
 +
|-
 +
| &#77; || &amp;#77;
 +
|-
 +
| &#78; || &amp;#78;
 +
|-
 +
| &#79; || &amp;#79;
 +
|-
 +
| &#80; || &amp;#80;
 +
|-
 +
| &#81; || &amp;#81;
 +
|-
 +
| &#82; || &amp;#82;
 +
|-
 +
| &#83; || &amp;#83;
 +
|-
 +
| &#84; || &amp;#84;
 +
|-
 +
| &#85; || &amp;#85;
 +
|-
 +
| &#86; || &amp;#86;
 +
|-
 +
| &#87; || &amp;#87;
 +
|-
 +
| &#88; || &amp;#88;
 +
|-
 +
| &#89; || &amp;#89;
 +
|-
 +
| &#90; || &amp;#90;
 +
|-
 +
| &#91; || &amp;#91;
 +
|-
 +
| &#92; || &amp;#92;
 +
|-
 +
| &#93; || &amp;#93;
 +
|-
 +
| &#94; || &amp;#94;
 +
|-
 +
| &#95; || &amp;#95;
 +
|-
 +
| &#96; || &amp;#96;
 +
|}
 +
 +
| style="border:#0d0 1px solid; padding: 2px;" |
 +
 +
{|
 +
|-
 +
| &#97;  || &amp;#97;
 +
|-
 +
| &#98; || &amp;#98;
 +
|-
 +
| &#99; || &amp;#99;
 +
|-
 +
| &#100; || &amp;#100;
 +
|-
 +
| &#101; || &amp;#101;
 +
|-
 +
| &#102; || &amp;#102;
 +
|-
 +
| &#103; || &amp;#103;
 +
|-
 +
| &#104; || &amp;#104;
 +
|-
 +
| &#105; || &amp;#105;
 +
|-
 +
| &#106; || &amp;#106;
 +
|-
 +
| &#107; || &amp;#107;
 +
|-
 +
| &#108; || &amp;#108;
 +
|-
 +
| &#109; || &amp;#109;
 +
|-
 +
| &#110; || &amp;#110;
 +
|-
 +
| &#111; || &amp;#111;
 +
|-
 +
| &#112; || &amp;#112;
 +
|-
 +
| &#113; || &amp;#113;
 +
|-
 +
| &#114; || &amp;#114;
 +
|-
 +
| &#115; || &amp;#115;
 +
|-
 +
| &#116; || &amp;#116;
 +
|-
 +
| &#117; || &amp;#117;
 +
|-
 +
| &#118; || &amp;#118;
 +
|-
 +
| &#119; || &amp;#119;
 +
|-
 +
| &#120; || &amp;#120;
 +
|-
 +
| &#121; || &amp;#121;
 +
|-
 +
| &#122; || &amp;#122;
 +
|-
 +
| &#123; || &amp;#123;
 +
|-
 +
| &#124; || &amp;#124;
 +
|-
 +
| &#125; || &amp;#125;
 +
|-
 +
| &#126; || &amp;#126;
 +
|-
 +
| &#127; || &amp;#127;
 +
|-
 +
| &#128; || &amp;#128;
 +
|}
 +
 +
| style="border:#0d0 1px solid; padding: 2px;" |
 +
 +
{|
 +
|-
 +
| &#129; || &amp;#129;
 +
|-
 +
| &#130; || &amp;#130;
 +
|-
 +
| &#131; || &amp;#131;
 +
|-
 +
| &#132; || &amp;#132;
 +
|-
 +
| &#133; || &amp;#133;
 +
|-
 +
| &#134; || &amp;#134;
 +
|-
 +
| &#135; || &amp;#135;
 +
|-
 +
| &#136; || &amp;#136;
 +
|-
 +
| &#137; || &amp;#137;
 +
|-
 +
| &#138; || &amp;#138;
 +
|-
 +
| &#139; || &amp;#139;
 +
|-
 +
| &#140; || &amp;#140;
 +
|-
 +
| &#141; || &amp;#141;
 +
|-
 +
| &#142; || &amp;#142;
 +
|-
 +
| &#143; || &amp;#143;
 +
|-
 +
| &#144; || &amp;#144;
 +
|-
 +
| &#145; || &amp;#145;
 +
|-
 +
| &#146; || &amp;#146;
 +
|-
 +
| &#147; || &amp;#147;
 +
|-
 +
| &#148; || &amp;#148;
 +
|-
 +
| &#149; || &amp;#149;
 +
|-
 +
| &#150; || &amp;#150;
 +
|-
 +
| &#151; || &amp;#151;
 +
|-
 +
| &#152; || &amp;#152;
 +
|-
 +
| &#153; || &amp;#153; &amp;trade;
 +
|-
 +
| &#154; || &amp;#154;
 +
|-
 +
| &#155; || &amp;#155;
 +
|-
 +
| &#156; || &amp;#156;
 +
|-
 +
| &#157; || &amp;#157;
 +
|-
 +
| &#158; || &amp;#158;
 +
|-
 +
| &#159; || &amp;#159;
 +
|-
 +
| &#160; || &amp;#160;
 +
|}
 +
 +
| style="border:#0d0 1px solid; padding: 2px;" |
 +
 +
{|
 +
|-
 +
| &#161; || &amp;#161;
 +
|-
 +
| &#162; || &amp;#162;
 +
|-
 +
| &#163; || &amp;#163; &amp;pound;
 +
|-
 +
| &#164; || &amp;#164;
 +
|-
 +
| &#165; || &amp;#165;
 +
|-
 +
| &#166; || &amp;#166;
 +
|-
 +
| &#167; || &amp;#167; &amp;sect;
 +
|-
 +
| &#168; || &amp;#168;
 +
|-
 +
| &#169; || &amp;#169; &amp;copy;
 +
|-
 +
| &#170; || &amp;#170;
 +
|-
 +
| &#171; || &amp;#171;
 +
|-
 +
| &#172; || &amp;#172;
 +
|-
 +
| &#173; || &amp;#173;
 +
|-
 +
| &#174; || &amp;#174;
 +
|-
 +
| &#175; || &amp;#175;
 +
|-
 +
| &#176; || &amp;#176;
 +
|-
 +
| &#177; || &amp;#177;
 +
|-
 +
| &#178; || &amp;#178;
 +
|-
 +
| &#179; || &amp;#179;
 +
|-
 +
| &#180; || &amp;#180;
 +
|-
 +
| &#181; || &amp;#181;
 +
|-
 +
| &#182; || &amp;#182;
 +
|-
 +
| &#183; || &amp;#183;
 +
|-
 +
| &#184; || &amp;#184;
 +
|-
 +
| &#185; || &amp;#185;
 +
|-
 +
| &#186; || &amp;#186;
 +
|-
 +
| &#187; || &amp;#187;
 +
|-
 +
| &#188; || &amp;#188;
 +
|-
 +
| &#189; || &amp;#189;
 +
|-
 +
| &#190; || &amp;#190;
 +
|-
 +
| &#191; || &amp;#191;
 +
|-
 +
| &#192; || &amp;#192; &amp;Agrave;
 +
|}
 +
 +
| style="border:#0d0 1px solid; padding: 2px;" |
 +
 +
{|
 +
|-
 +
| &#193; || &amp;#193; &amp;Aacute;
 +
|-
 +
| &#194; || &amp;#194;
 +
|-
 +
| &#195; || &amp;#195; &amp;Atilde;
 +
|-
 +
| &#196; || &amp;#196; &amp;Auml;
 +
|-
 +
| &#197; || &amp;#197;
 +
|-
 +
| &#198; || &amp;#198; &amp;AElig;
 +
|-
 +
| &#199; || &amp;#199; &amp;Ccedil;
 +
|-
 +
| &#200; || &amp;#200;
 +
|-
 +
| &#201; || &amp;#201;
 +
|-
 +
| &#202; || &amp;#202;
 +
|-
 +
| &#203; || &amp;#203;
 +
|-
 +
| &#204; || &amp;#204;
 +
|-
 +
| &#205; || &amp;#205;
 +
|-
 +
| &#206; || &amp;#206;
 +
|-
 +
| &#207; || &amp;#207;
 +
|-
 +
| &#208; || &amp;#208;
 +
|-
 +
| &#209; || &amp;#209;
 +
|-
 +
| &#210; || &amp;#210;
 +
|-
 +
| &#211; || &amp;#211;
 +
|-
 +
| &#212; || &amp;#212;
 +
|-
 +
| &#213; || &amp;#213;
 +
|-
 +
| &#214; || &amp;#214;
 +
|-
 +
| &#215; || &amp;#215;
 +
|-
 +
| &#216; || &amp;#216;
 +
|-
 +
| &#217; || &amp;#217;
 +
|-
 +
| &#218; || &amp;#218;
 +
|-
 +
| &#219; || &amp;#219;
 +
|-
 +
| &#220; || &amp;#220;
 +
|-
 +
| &#221; || &amp;#221;
 +
|-
 +
| &#222; || &amp;#222;
 +
|-
 +
| &#223; || &amp;#223;
 +
|-
 +
| &#224; || &amp;#224;
 +
|}
 +
 +
| style="border:#0d0 1px solid; padding: 2px;" |
 +
 +
{|
 +
|-
 +
| &#225; || &amp;#225;
 +
|-
 +
| &#226; || &amp;#226;
 +
|-
 +
| &#227; || &amp;#227;
 +
|-
 +
| &#228; || &amp;#228;
 +
|-
 +
| &#229; || &amp;#229;
 +
|-
 +
| &#230; || &amp;#230;
 +
|-
 +
| &#231; || &amp;#231; &amp;ccedil;
 +
|-
 +
| &#232; || &amp;#232;
 +
|-
 +
| &#233; || &amp;#233;
 +
|-
 +
| &#234; || &amp;#234;
 +
|-
 +
| &#235; || &amp;#235;
 +
|-
 +
| &#236; || &amp;#236;
 +
|-
 +
| &#237; || &amp;#237;
 +
|-
 +
| &#238; || &amp;#238;
 +
|-
 +
| &#239; || &amp;#239;
 +
|-
 +
| &#240; || &amp;#240;
 +
|-
 +
| &#241; || &amp;#241;
 +
|-
 +
| &#242; || &amp;#242;
 +
|-
 +
| &#243; || &amp;#243;
 +
|-
 +
| &#244; || &amp;#244;
 +
|-
 +
| &#245; || &amp;#245;
 +
|-
 +
| &#246; || &amp;#246;
 +
|-
 +
| &#247; || &amp;#247;
 +
|-
 +
| &#248; || &amp;#248; &amp;oslash;
 +
|-
 +
| &#249; || &amp;#249;
 +
|-
 +
| &#250; || &amp;#250;
 +
|-
 +
| &#251; || &amp;#251;
 +
|-
 +
| &#252; || &amp;#252;
 +
|-
 +
| &#253; || &amp;#253;
 +
|-
 +
| &#254; || &amp;#254; &amp;thorn;
 +
|-
 +
| &#255; || &amp;#255;
 +
|-
 +
| &#256; || &amp;#256;
 +
|}
 +
 +
|}
 +
==Entities by Appearance==
 +
* {{show/entity|rsquo}} - right single-quote
 +
* {{show/entity|lsquo}} - left single-quote
 +
* {{show/entity|Alpha}} - Greek letter alpha (upper)
 +
* {{show/entity|Beta}} - Greek letter beta (upper)
 +
* {{show/entity|Gamma}} - Greek letter gamma (upper)
 +
* {{show/entity|Delta}} - Greek letter delta (upper)
 +
* {{show/entity|alpha}} - Greek letter alpha (lower)
 +
* {{show/entity|beta}} - Greek letter beta (lower)
 +
* {{show/entity|gamma}} - Greek letter gamma (lower)
 +
* {{show/entity|delta}} - Greek letter delta (lower)
 +
===Roman alphabet===
 +
{| border=1
 +
|-
 +
! upper || lower || mnemonics
 +
|-
 +
| {{show/entity|#193}} - '''A''' with acute accent
 +
| {{show/entity|#225}} - '''a''' with acute accent
 +
| {{show/entity|Aacute}} {{show/entity|aacute}}
 +
|-
 +
|
 +
| {{show/entity|#257}} - '''a''' with macron
 +
|-
 +
|
 +
| {{show/entity|#259}} - '''a''' with {{l/mw|caron}}
 +
|-
 +
| {{show/entity|#268}} - '''C''' with {{l/mw|caron}}
 +
| {{show/entity|#269}} - '''c''' with {{l/mw|caron}}
 +
| {{show/entity|Ccaron}} {{show/entity|ccaron}}
 +
|}
 +
 +
==Links==
 +
* {{wikipedia|List of XML and HTML character entity references}} - a more complete list

Latest revision as of 21:15, 26 April 2021

About

An HTML entity is a combination of characters which will be displayed within an HTML browser as a single character. All HTML entities begin with "&" (ampersand) and end with ";" (semicolon). Many entities have mnemonic names (such as "&amp;", which displays an ampersand); any possible character can be displayed as an entity by using the format "&#number;" where number is the output character's ASCII value in decimal.

see also: wikipedia:Percent-encoding

Reference

Questions

  • Does Google resolve html entities when indexing web pages? That is, if I spelled a word (e.g. "schmerglefrotz") entirely using html entities, would someone be able to find that page using google by typing "schmerglefrotz" (after the site had been spidered, of course)? (As a test, I will spell a completely different word using HTML entities, and try Googling it later: FRELGKLOTZ)
    • 2007-07-15 answer: Yes, it does find it (though it took several months at least before this page got indexed).
    • 2016-11-28 answer: Searching for the word in question no longer produces any results. Neither does searching for "schmerglefrotz".

Note

  • 2017-11-11 MediaWiki 1.28.0 apparently no longer supports the "&#d;" style of entity; you now have to use named entities.
  • 2020-05-23 This seems to have been fixed?

Entities by Number

  • 0-8 are not translated
  • 9 is probably TAB
  • 10 is probably LF
  • 13 is probably CR
  • 14-31 are not translated
  • 32 is a standard space
lower ASCII upper ASCII
&#33; !
&#34; "
&#35; #
&#36; $
&#37; %
&#38; & &amp; : &
&#39; '
&#40; (
&#41; )
&#42; *
&#43; +
&#44; ,
&#45; -
&#46; .
&#47; /
&#48; 0
&#49; 1
&#50; 2
&#51; 3
&#52; 4
&#53; 5
&#54; 6
&#55; 7
&#56; 8
&#57; 9
&#58; :
&#59; ;
&#60; <
&#61; =
&#62; >
&#63; ?
&#64; @
A &#65;
B &#66;
C &#67;
D &#68;
E &#69;
F &#70;
G &#71;
H &#72;
I &#73;
J &#74;
K &#75;
L &#76;
M &#77;
N &#78;
O &#79;
P &#80;
Q &#81;
R &#82;
S &#83;
T &#84;
U &#85;
V &#86;
W &#87;
X &#88;
Y &#89;
Z &#90;
[ &#91;
\ &#92;
] &#93;
^ &#94;
_ &#95;
` &#96;
a &#97;
b &#98;
c &#99;
d &#100;
e &#101;
f &#102;
g &#103;
h &#104;
i &#105;
j &#106;
k &#107;
l &#108;
m &#109;
n &#110;
o &#111;
p &#112;
q &#113;
r &#114;
s &#115;
t &#116;
u &#117;
v &#118;
w &#119;
x &#120;
y &#121;
z &#122;
{ &#123;
&#124;
} &#125;
~ &#126;
&#127; &#127;
&#128; &#128;
&#129; &#129;
&#130; &#130;
&#131; &#131;
&#132; &#132;
&#133; &#133;
&#134; &#134;
&#135; &#135;
&#136; &#136;
&#137; &#137;
&#138; &#138;
&#139; &#139;
&#140; &#140;
&#141; &#141;
&#142; &#142;
&#143; &#143;
&#144; &#144;
&#145; &#145;
&#146; &#146;
&#147; &#147;
&#148; &#148;
&#149; &#149;
&#150; &#150;
&#151; &#151;
&#152; &#152;
&#153; &#153; &trade;
&#154; &#154;
&#155; &#155;
&#156; &#156;
&#157; &#157;
&#158; &#158;
&#159; &#159;
  &#160;
¡ &#161;
¢ &#162;
£ &#163; &pound;
¤ &#164;
¥ &#165;
¦ &#166;
§ &#167; &sect;
¨ &#168;
© &#169; &copy;
ª &#170;
« &#171;
¬ &#172;
­ &#173;
® &#174;
¯ &#175;
° &#176;
± &#177;
² &#178;
³ &#179;
´ &#180;
µ &#181;
&#182;
· &#183;
¸ &#184;
¹ &#185;
º &#186;
» &#187;
¼ &#188;
½ &#189;
¾ &#190;
¿ &#191;
À &#192; &Agrave;
Á &#193; &Aacute;
 &#194;
à &#195; &Atilde;
Ä &#196; &Auml;
Å &#197;
Æ &#198; &AElig;
Ç &#199; &Ccedil;
È &#200;
É &#201;
Ê &#202;
Ë &#203;
Ì &#204;
Í &#205;
Î &#206;
Ï &#207;
Ð &#208;
Ñ &#209;
Ò &#210;
Ó &#211;
Ô &#212;
Õ &#213;
Ö &#214;
× &#215;
Ø &#216;
Ù &#217;
Ú &#218;
Û &#219;
Ü &#220;
Ý &#221;
Þ &#222;
ß &#223;
à &#224;
á &#225;
â &#226;
ã &#227;
ä &#228;
å &#229;
æ &#230;
ç &#231; &ccedil;
è &#232;
é &#233;
ê &#234;
ë &#235;
ì &#236;
í &#237;
î &#238;
ï &#239;
ð &#240;
ñ &#241;
ò &#242;
ó &#243;
ô &#244;
õ &#245;
ö &#246;
÷ &#247;
ø &#248; &oslash;
ù &#249;
ú &#250;
û &#251;
ü &#252;
ý &#253;
þ &#254; &thorn;
ÿ &#255;
Ā &#256;

Entities by Appearance

  • &rsquo; : - right single-quote
  • &lsquo; : - left single-quote
  • &Alpha; : Α - Greek letter alpha (upper)
  • &Beta; : Β - Greek letter beta (upper)
  • &Gamma; : Γ - Greek letter gamma (upper)
  • &Delta; : Δ - Greek letter delta (upper)
  • &alpha; : α - Greek letter alpha (lower)
  • &beta; : β - Greek letter beta (lower)
  • &gamma; : γ - Greek letter gamma (lower)
  • &delta; : δ - Greek letter delta (lower)

Roman alphabet

upper lower mnemonics
&#193; : Á - A with acute accent &#225; : á - a with acute accent &Aacute; : Á &aacute; : á
&#257; : ā - a with macron
&#259; : ă - a with caron
&#268; : Č - C with caron &#269; : č - c with caron &Ccaron; : &Ccaron; &ccaron; : &ccaron;

Links