如何通过HTML代码编码双引号 [英] How to Code Double Quotes via HTML Codes

查看:192
本文介绍了如何通过HTML代码编码双引号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在HTML中,指定html代码(如)的首选方法是什么,以及主要区别是什么?例如:


$
&#34;<! - <! - 友好代码 - >
&#34;<! - - 数字代码 - >
&#x22;<! - 十六进制代码 - >

我应该使用哪一个,如果其中的一个被弃用,它会成为问题吗?

解决方案



& quot; 被处理为& ;#34; ,它是& x22; 的十进制等价物,它是ISO 8859-1等价物



您可能会反对使用& quot; 的唯一原因是因为错误地从HTML 3.2规范中省略



否则它是al我归结为个人喜好。


In HTML, What is the preferred way to specify html codes like ", and what is the major differences? For example:

&quot;    <!-- friendly code -->
&#34;     <!-- numerical code -->
&#x22;    <!-- hex code -->

Which one should I use and would it ever be an issue if one of these gets deprecated?

解决方案

There really aren't any differences.

&quot; is processed as &#34; which is the decimal equivalent of &x22; which is the ISO 8859-1 equivalent of ".

The only reason you may be against using &quot; is because it was mistakenly omitted from the HTML 3.2 specification.

Otherwise it all boils down to personal preference.

这篇关于如何通过HTML代码编码双引号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆