Often in coding languages, there is an escape character which either
makes the next character interpreted literally or
makes the next character interpreted as code within a string.
Is there such an escape character in HTML, or do I need Javascript to do so? Searching both the internet and stackoverflow yielded no results.
I assume what you're talking about is the difference from including something like "<" as a part of a tag such as <div>
and as just a string to symbolize 'less than'. That is, the escape for "<" would be <
. If so, you can find a full list of escapes here . No JavaScript is required.
Hope this helped.
As far as I know, all escape characters begin with &#
and end with ;
, however the actual escape character varies depending on what you're writing. Here are some references for you:
Further explanation: http://www.w3.org/International/questions/qa-escapes
List of escape characters: http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php?PHPSESSID=8cbbddde9a9c9825467546f1c98fe119
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.