• Resolved Engine44

    (@engine44)


    I just came across the term “HTML Special Characters”. When I type HTML, I use tags that include left and right arrows: <br>. Apparently, these arrows also can also be represented with special codes. Why would I ever want or need to use these codes. Typing < or > is much easier. Thanks.

    • This topic was modified 5 years, 4 months ago by Engine44.
    • This topic was modified 5 years, 4 months ago by Engine44.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, @engine44

    Let’s take 2 examples and what is the result for each of them

    <br> will result in a new line

    but what if you actually want to output the characters <br> without being converted / interpreted by browser as a tag? Well, then you’ll use special characters:

    & lt; br & gt; (without spaces) will result in <br> not in a new line.

    Some characters are reserved in HTML. If you use the less than (<) or greater than (>) signs in your text, the browser might mix them with tags.

    Character entities are used to display reserved characters in HTML.

    So you use them only if you want to force the browser not to interpret them as a HTML tag, but as a character instead.

    Hope this helps,
    Kind regards!

    Thread Starter Engine44

    (@engine44)

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘HTML Special Characters?’ is closed to new replies.