Chopster0123
Chopster0123

Reputation: 19

"Â" appearing when "£" is used in a h3 tag

I am getting really confused because when I include a pound sign within an <h3> tag, the  character appears before it. Any help with removing it?

<div align="right" style="margin-right: 300px;">
    <p>
        <h2>£25.00</h2>
    </p>
</div>

The output to screen appears as "£25.00" - I can't screenshot it as it crashes my pc.

Upvotes: 2

Views: 295

Answers (2)

Michas
Michas

Reputation: 9468

It looks You edit text in UTF-8 and display it in WINDOWS-1252. You should change display to the former.

To set encoding for display You can add <meta charset='utf-8'> to the top of the head of html. You should however set the encoding on server too.

Upvotes: 1

Luke
Luke

Reputation: 5104

You need to escape the £ since it is a special character. Instead of typing it as '£', use the character entity &pound;

So your tag should look like

<h2>&pound;25.00</h2>

Upvotes: 3

Related Questions