Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php ID旁边的哈希符号_Php_Html - Fatal编程技术网

Php ID旁边的哈希符号

Php ID旁边的哈希符号,php,html,Php,Html,我注意到,大多数开发人员在html页面中使用id(#253)时,都会在id旁边添加哈希符号。原因是什么 编辑:我说的不是嵌入html标记中的id属性,而是表示方面,例如,最终用户将看到一个表行: id name family #34 nina janet 使用id属性链接到页面中具有指定id的元素: e、 g #是一个id选择器。类似地,是类选择器。 有关选择器的更多信息,请参见此你是认真的吗?看一看 <h2><a id="top">Some h

我注意到,大多数开发人员在html页面中使用id(
#253
)时,都会在id旁边添加哈希符号。原因是什么

编辑:我说的不是嵌入html标记中的id属性,而是表示方面,例如,最终用户将看到一个表行:

id    name   family
#34   nina    janet

使用
id
属性链接到页面中具有指定id的元素: e、 g


#
是一个id选择器。类似地,
是类选择器。 有关选择器的更多信息,请参见此

你是认真的吗?看一看
<h2><a id="top">Some heading</a></h2>

<p>Lots of text....</p>
<p>Lots of text....</p>
<p>Lots of text....</p>

<a href="#top">Go to top</a>