Questions tagged [html-entities]

HTML entities provide a method of entering characters that cannot be expressed in the document's character encoding or that cannot easily be entered on a keyboard.

HTML entities provide a method of entering characters that cannot be expressed in the document's character encoding or that cannot easily be entered on a keyboard.

HTML Entities Format

Entities take the form of &entityname; like in   (which means a non-breaking space) or & (which means &). Entities are also case sensitive, so there is a difference between á (which means á) and Á (which means Á).

Numeric Character References

Besides HTML entities, numeric character references can also be used to express characters. While entities are limited, using numeric character references you can express any character.

Numeric Character References Format

The format is &#number;. number can be either decimal or hexadecimal (prefixed with x).

For example:

✓

...can be reproduced using: ✓ (decimal), ✓ (hexadecimal), ✓ or ✓.

Links

1350 questions
1124
votes
10 answers

Adding HTML entities using CSS content

How do you use the CSS content property to add HTML entities? Using something like this just prints   to the screen instead of the non-breaking space: .breadcrumbs a:before { content: ' '; }
nickf
  • 537,072
  • 198
  • 649
  • 721
628
votes
10 answers

What do < and > stand for?

I know that the entities < and > are used for < and >, but I am curious what these names stand for. Does < stand for something like "Left tag" or is it just a code?
Michiel Pater
  • 22,377
  • 5
  • 43
  • 57
370
votes
7 answers

Decode HTML entities in Python string?

I'm parsing some HTML with Beautiful Soup 3, but it contains HTML entities which Beautiful Soup 3 doesn't automatically decode for me: >>> from BeautifulSoup import BeautifulSoup >>> soup = BeautifulSoup("

£682m

") >>> text =…
jkp
  • 78,960
  • 28
  • 103
  • 104
369
votes
5 answers

Which characters need to be escaped in HTML?

Are they the same as XML, perhaps plus the space one ( )? I've found some huge lists of HTML escape characters but I don't think they must be escaped. I want to know what needs to be escaped.
Ahmet
  • 4,310
  • 4
  • 19
  • 21
278
votes
7 answers

What's the right way to decode a string that has special HTML entities in it?

Say I get some JSON back from a service request that looks like this: { "message": "We're unable to complete your request at this time." } I'm not sure why that apostraphe is encoded like that ('); all I know is that I want to decode…
Dan Tao
  • 125,917
  • 54
  • 300
  • 447
246
votes
7 answers

HTML entity for the middle dot

I'm looking for the html code for the dot. Not the dot that's at the end of sentences but the dot that's used to separate items horizontally. Item 1 . Item 2 . Item 3 The traditional dot is centered on the bottom of the line while the dot I'm…
frenchie
  • 51,731
  • 109
  • 304
  • 510
223
votes
5 answers

Is there Unicode glyph Symbol to represent "Search"

Unicode has a million icon-like glyphs, but they're very hard to search. Is there a Unicode glyph that looks like a "Binocular" or "magnifying glass"? Or is there a symbol that's used to mean "Search", which is in Unicode?
Prasad Jadhav
  • 5,090
  • 16
  • 62
  • 80
198
votes
5 answers

Transmitting newline character "\n"

Given the following URL (working, try it!) https://select-test.wp3.rbsworldpay.com/wcc/purchase?instId=151711&cartId=28524¤cy=GBP&amount=1401.49&testMode=100&name=Tom%20Gul&address=24%20House%20Road\nSome …
Tom Gullen
  • 61,249
  • 84
  • 283
  • 456
189
votes
9 answers

Infinity symbol with HTML

How can I display an infinity symbol (like the one in the picture) using HTML?
user94154
  • 16,176
  • 20
  • 77
  • 116
140
votes
23 answers

How do I decode HTML entities in Swift?

I am pulling a JSON file from a site and one of the strings received is: The Weeknd ‘King Of The Fall’ [Video Premiere] | @TheWeeknd | #SoPhi How can I convert things like ‘ into the correct characters? I've made a Xcode Playground…
code_cookies
  • 3,910
  • 4
  • 16
  • 14
138
votes
8 answers

When should one use HTML entities?

This has been confusing me for some time. With the advent of UTF-8 as the de-facto standard in web development I'm not sure in which situations I'm supposed to use the HTML entities and for which ones should I just use the UTF-8 character. For…
allesklar
  • 9,506
  • 6
  • 36
  • 53
120
votes
7 answers

Is there an HTML entity for an info icon?

I am looking for a basic information icon like this:
Alexcamostyle
  • 3,623
  • 4
  • 14
  • 13
113
votes
5 answers

Breaking space (opposite of non-breaking space)

While solving a little bug on a website caused by a non-breaking space ( ) I was wondering if there's an opposite. Is there an HTML code for a breaking space, and if so, what is it? I saw mention in this question about a zero-width space…
Sander Koedood
  • 6,007
  • 6
  • 25
  • 34
100
votes
5 answers

Error Parsing /page.xhtml: Error Traced[line: 42] The entity "nbsp" was referenced, but not declared

I'd like to use non breaking spaces in my JSF page. I know, in plain HTML I could use   for this and this works fine. However, when I put those   in a Facelets page, then it errors as follows: Error Parsing /page.xhtml: Error Traced[line:…
Fahim Parkar
  • 30,974
  • 45
  • 160
  • 276
85
votes
10 answers

Replacing   from javascript dom text node

I am processing xhtml using javascript. I am getting the text content for a div node by concatenating the nodeValue of all child nodes where nodeType == Node.TEXT_NODE. The resulting string sometimes contains a non-breaking space entity. How do I…
user158678
  • 988
  • 1
  • 7
  • 8
1
2 3
89 90