質問

I am creating html page for iOS,where i need to put " ♠, ♥, ♦, and ♣ ". These are the cards symbols.

But since this is not normal text, the text on the iPhone is coming up as unusual text. please suggest me html code for using these symbols in my html code.

役に立ちましたか?

解決

♠    ♠   Spade card suit
♣         ♣   Clubs card suit
♦         ♦   Diamonds card suit
♥    ♥   Hearts card suit

他のヒント

If you put characters like ♠, ♥, ♦, and ♣ into an HTML document, you need to make sure that the declared encoding of the document coincides with the actual encoding. Normally, the encoding should be UTF-8. See the W3C document Declaring character encodings in HTML.

Using entity references like ♠ circumvents the problem, but the solution is to fix the encoding issue. What if there are other special characters, now or after next edit of the document. And a character need not be any more special than the simple curly apostrophe (’) to create encoding issues.

You can use the equivalent html entities ♥♥♠♣♦

Have you tried the following:

♠   ♠
♣   ♣
♥   ♥
♦   ♦

Got the codes from this reference page.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top