由于要写一篇有代码的日志,但是这个该死的默认编辑器不知道在什么时候哪些代码我想原样显示,那些代码我想作为代码执行之后显示,所以总是弄的一塌糊涂,虽然有WP-Syntax这个插件,但是在一大段话中总不能也来一段一行很短的代码吧?比如这个:<button>正确显示</button> 如果不使用”<“和”>”的ASCII码的话,死活显示不好,就显示这样了:,但是又不想使用WP-Syntax这个插件使它单独显示一行,那就只能使用ASCII码来代替相应的”<“和”>”符号了,所以解决问题。为了方便我以后使用,也为了方便大家,就整理一下,弄出来给大家留着使用,以防不时之需。

HTML与XHTML都是使用标准的7-位 ASCII码来进行页面间数据的传输的,7-位ASCII码代表了128个不同的字符值(0-127)

 

 

可打印的7-BIT ASCII字符

结果 描述 实体数
  space 间隙 &#32;
! exclamation mark 感叹号 &#33;
quotation mark 双引号 &#34;
# number sign 井号 &#35;
$ dollar sign 美圆符 &#36;
% percent sign 百分符 &#37;
& ampersand &#38;
apostrophe 单引 &#39;
( left parenthesis  &#40;
) right parenthesis &#41;
* asterisk &#42;
+ plus sign &#43;
, comma &#44;
hyphen &#45;
. period &#46;
/ slash &#47;
0 digit 0 &#48;
1 digit 1 &#49;
2 digit 2 &#50;
3 digit 3 &#51;
4 digit 4 &#52;
5 digit 5 &#53;
6 digit 6 &#54;
7 digit 7 &#55;
8 digit 8 &#56;
9 digit 9 &#57;
: colon &#58;
; semicolon &#59;
< less-than &#60;
= equals-to &#61;
> greater-than &#62;
? question mark &#63;
@ at sign &#64;
A uppercase A &#65;
B uppercase B &#66;
C uppercase C &#67;
D uppercase D &#68;
E uppercase E &#69;
F uppercase F &#70;
G uppercase G &#71;
H uppercase H &#72;
I uppercase I &#73;
J uppercase J &#74;
K uppercase K &#75;
L uppercase L &#76;
M uppercase M &#77;
N uppercase N &#78;
O uppercase O &#79;
P uppercase P &#80;
Q uppercase Q &#81;
R uppercase R &#82;
S uppercase S &#83;
T uppercase T &#84;
U uppercase U &#85;
V uppercase V &#86;
W uppercase W &#87;
X uppercase X &#88;
Y uppercase Y &#89;
Z uppercase Z &#90;
[ left square bracket &#91;
  backslash &#92;
] right square bracket &#93;
^ caret &#94;
_ underscore &#95;
` grave accent &#96;
a lowercase a &#97;
b lowercase b &#98;
c lowercase c &#99;
d lowercase d &#100;
e lowercase e &#101;
f lowercase f &#102;
g lowercase g &#103;
h lowercase h &#104;
i lowercase i &#105;
j lowercase j &#106;
k lowercase k &#107;
l lowercase l &#108;
m lowercase m &#109;
n lowercase n &#110;
o lowercase o &#111;
p lowercase p &#112;
q lowercase q &#113;
r lowercase r &#114;
s lowercase s &#115;
t lowercase t &#116;
u lowercase u &#117;
v lowercase v &#118;
w lowercase w &#119;
x lowercase x &#120;
y lowercase y &#121;
z lowercase z &#122;
{ left curly brace &#123;
| vertical bar &#124;
} right curly brace &#125;
~ tilde &#126;

7位ASCII设备控制字符

ASCII设备控制字符最初是用于控制硬件设备的,如:打印机、录音设备。这个字符不属于HTML文档。

结果 描述 实体数
NUL null character &#00;
SOH start of header &#01;
STX start of text &#02;
ETX end of text &#03;
EOT end of transmission &#04;
ENQ enquiry &#05;
ACK acknowledge &#06;
BEL bell (ring) &#07;
BS backspace &#08;
HT horizontal tab &#09;
LF line feed &#10;
VT vertical tab &#11;
FF form feed &#12;
CR carriage return &#13;
SO shift out &#14;
SI shift in &#15;
DLE data link escape &#16;
DC1 device control 1 &#17;
DC2 device control 2 &#18;
DC3 device control 3 &#19;
DC4 device control 4 &#20;
NAK negative acknowledge &#21;
SYN synchronize &#22;
ETB end transmission block &#23;
CAN cancel &#24;
EM end of medium &#25;
SUB substitute &#26;
ESC escape &#27;
FS file separator &#28;
GS group separator &#29;
RS record separator &#30;
US unit separator &#31;
DEL delete (rubout) &#127;

没有评论

  • :arrow:
  • :grin:
  • :???:
  • :cool:
  • :cry:
  • :shock:
  • :evil:
  • :!:
  • :idea:
  • :lol:
  • :mad:
  • :mrgreen:
  • :neutral:
  • :?:
  • :razz:
  • :oops:
  • :roll:
  • :sad:
  • :smile:
  • :eek:
  • :twisted:
  • :wink: