Escape tags in html

后端 未结 5 952
一整个雨季
一整个雨季 2020-12-15 03:13

What are escape tags in html?

Are they " < > to represent \" < &g

5条回答
  •  死守一世寂寞
    2020-12-15 03:39

    How do these work?

    Anything &#num; is replaced with character from ASCII table, matching that num.

    Is that hex, or what is it?

    It's not hex, the number represents characters number in decimal in ASCII table. Check out ASCII table. Check Dec and HTML columns.

    Why aren't they just the characters themselves?

    Look at this example:

    Hey you can use
    to end div tag!

    It would mess up the interpreter. It's a bad example, but you got the idea.

    Why you can't use escape characters like in programming languages?

    I don't have exact answer to that. But html same as xml is a markup language and not programming language and answer probably lies within history of how markup languages become what they are now.

提交回复
热议问题