What is & used for

后端 未结 5 2150
死守一世寂寞
死守一世寂寞 2020-12-04 16:03

Is there any difference in behaviour of below URL.

I don\'t know why the & is inserted, does it make any difference ?

www.testur         


        
5条回答
  •  死守一世寂寞
    2020-12-04 16:51

    That's a great example. When ¤t is parsed into a text node it is converted to ¤t. When parsed into an attribute value, it is parsed as ¤t.

    If you want ¤t in a text node, you should write &current in your markup.

    The gory details are in the HTML5 parsing spec - Named Character Reference State

提交回复
热议问题