Question of HTML entities?

  • Thread starter Thread starter Tony Y
  • Start date Start date
T

Tony Y

Guest
As you know entities such as '&amp' , '&gt' are used to represent special characters in HTML. However, when I need to print these entities on my web pages, how can I achieve it?
 
Example: you want to display these 5 characters as-is on your page (you don't want them just shown as the single character '&'):

&

To do that, put these characters in your HTML:

&

The first 5 characters will be displayed as '&' and the remaining characters will be displayed as-is.
 
Back
Top