Special HTML Characters - html

Ok, so I want to have the characters from below in my html page. Seems easy, except I can't find the HTML encoding for them.
Note: I would like to do this without having sized elements, plain ol' text would be fine ^_^.
Cheers.

You can see that they have a unicode number of the selected character - at the bottom of the picture ("U+266A: Eighth Note").
Simply use the last portion in a unicode character entity: ♪ - ♪
If your page is already UTF-8, you can simply paste it in.

Try encoding it as █ - that should do the trick!

In a UTF-8 encoded page, just copy and paste them as-is.
Otherwise, use the number that the dialog gives you for each character, e.g. ♪
However, when working with rather exotic characters, be very wary of font support. See e.g. this question for background: Unicode support in Web standard fonts
This page gives some information about support for the characters you want to use. They seem to be relatively well supported, but a test on Linux and Mac machines won't hurt.

Here is one comprehensive entity reference. If you want to convert symbols into their entity counterparts, I suggest using this converter.

My suggestion is to use hexadecimal reference. ( it's easy dont worry :) )
for example, the first character you have highlighted in red got ascii value of 175, which is AF in hex.
So in short you can encode it using %AF, and so on...
is it clear mate? Let me know if you need further explanation or help about this :)
Edit: my post is meant for url encoding.

Related

Html codes for ▐?

Is there a way to put a ▐ (ascii value of 222) in html character codes? (e.g. Þ)?
Is this possible? If not, is there some way to make sure it is reliably rendered by a browser?
Using the official W3 Character Reference sheet, we can find what you're looking for. You have several options:
█
█
█
█
▮
▮
▮
▮
❘
❘
❘
❘
You can then take this a step further by looking into various Unicode regions. This region has a few similar lines:
▌
▌
▍
▍
▎
▎
▏
▏
▐
▐
Note that you'll have to perform browser tests yourself, as not all browsers will be able to render these symbols. Ensuring that your page is in an appropriate UTF format (i.e. UTF-8) will help greatly.
I don't know from where you got "ascii value of 222". ASCII only goes to 127.
The character appears (to me) to be a U+2590 RIGHT HALF BLOCK. In HTML you can use ▐.
is there some way to make sure it is reliably rendered by a browser?
Yes: encode your document as UTF-8 (really – it’s the default on the web and the best choice nowadays) and include the character directly in the document.
Every modern text editor / IDE supports saving documents as UTF-8. To serve it to the browser, specify the encoding in the <head> section:
<meta charset="utf-8">
(This is HTML5; older versions are slightly different) and specify it in the HTTP header when serving the document from a server. Most servers are already configured to do this correctly.
HTML escape sequences, while still useful in certain scenarios, are by no means the easiest way of using arbitrary characters in HTML code.
Also, as others have noted, there’s some confusion here: ASCII only goes up to 127, there’s no ASCII character 222. Furthermore, ASCII is severely outdated and used almost nowhere nowadays. Most of the time, when somebody says “ASCII” they mean something else, and unfortunately they always mean different things. This is another reason to use Unicode and UTF-8 throughout: it avoids confusion.
I believe you have answered your own question. The other HTML entity for that character is Þ
Depending on your doctype, any compliant browser should render the character correctly.

Words showing differently in the browsers

I am working on a site which has some Norwegian words. When I used "På" inside a <span> it is showing as "PÃ¥" in the browser.This is happening only for a particular page. For others it is working fine.I have tried to copy-paste from other working pages.But had no effect.It is showing "PÃ¥" instead of "På".Why this is happening?
you need to use &aring insead of å
see this link for html codes-
http://www.ascii.cl/htmlcodes.htm
Try converting your special characters to equivalent HTML entities using this converter
The character encoding of the page is wrong: the real encoding differs from the declared encoding. Using entity references for all non-Ascii characters would hide the symptoms (with the pertaining risk that later on, when someone inserts an “å”, things go wrong again). But the solution is to remove the conflict.
Check out the tutorial Declaring character encodings in HTML. If you need further help with this, posting the URL (not just copy of all code) is essential.

What is a good resource for HTML character codes -> glyph and

I've already found a good site to convert HTML character codes to their respective glyphs:
http://www.public.asu.edu/~rjansen/glyph_encoding.html
However, I need a bit more information. Does anyone know of a site like the one above that also provides information on what type of character code it is? Meaning, is it a special character? Is the glyph visible? Etc...
So far I have found some tables with this information, but they aren't as complete as the resource above. I would really like to get my hands on a complete table.
Thanks,
-Ben
HTML Entity Character Lookup
I like FileFormat.Info--e.g.: http://www.fileformat.info/info/unicode/char/20ac/index.htm
The character map on Ubuntu (and I assume most other Linux distros) is fantastic. You can search for any character by its name or description (e.g. "arrow") really easily.
Windows' character map is a poor imitation but kinda works too. It seems to decide that certain fonts (Arial, Verdana etc) can't display some characters, even though they work absolutely fine. (Hint: try MS's more recent font creations like Calibri for better results.)
Once you've found a character you can either:
Copy it and use it directly (requires pages to be UTF-8) like this: ↗
Insert it as a hexadecimal entity. The above character is "U+2197 North East Arrow" so the entity would be ↗
Convert the hex code to decimal (the calculators on Windows and Linux can do this). The above example is ↗
Here's a quick, low-footprint way to look them up: &what;

Euro sign in HTML

The euro (€) is the official currency in 22 European states.
In HTML there are different possibilities to display the sign €:
€
€
€
Which one would you use in HTML? I think no representation is supported in all browsers. It's a pity that there is no standard way to display the sign.
Can you recommend one of the representations? What are the differences? Which ist supported best?
I hope you can help me. Thank you very much in advance!
Which one would you use in HTML?
None of them. Use an appropriate encoding (i.e.: UTF-8 or another Unicode transform) and use the charcter directly. Do not use HTML entities if at all avoidable, since they’ve got no advantage over use of a proper encoding.
Also, this is wrong:
It's a pity that there is no standard way to display the sign.
There is, and it’s the way I’ve described. Literally every browser, down to and including MSIE 5 will display Unicode characters correctly if the chosen fond supports the glyph.
The only valid reason to not use Unicode characters and instead fall back to entities might be projects that use legacy software which doesn’t support Unicode well. But that should never happen, right?
According to Google Doctype € is supported in all browsers. But maybe not all fonts.
edit
I also agree with Konrad Rudolph, use the character directly if you can.
From Google's HTML/CSS styleguide:
Do not use entity references.
There is no need to use entity references like —, ”, or ☺, assuming the same encoding (UTF-8) is used for files and editors as well as among teams.
The only exceptions apply to characters with special meaning in HTML (like < and &) as well as control or “invisible” characters (like no-break spaces).
<!-- Not recommended -->
The currency symbol for the Euro is “&eur;”.
<!-- Recommended -->
The currency symbol for the Euro is “€”.
You should really just test it and specify those browsers that support it as minimum requirements. This eases your workload considerably since it makes the user responsible :-) Or, alternatively, use the word "euro" or the "EUR" curruncy designator (like USD, AUD, JPY and so on).
I use € as you can see here : € it works in Firefox, Chrome and IE at least.
The accepted answer is actually awful,at least as of today. Best choice is to use €
€ is not Unicode, btw, even though it works. It's ANSI. JavaScript String.fromCodePoint(128) will give you a control character you won't even be able to see. Stay away from that.
If you're going to use plain UTF-8 text for symbols you might end up having mistakes after changing db properties, or if you're just typing it into file, once you accidentally copy it into an ANSI-coded, or some a file with some other encoding. Been there.

Is it possible to print DOS characters on a website?

I would like to print some kind of ASCII "art" on a web page in pre-tags. These graphics use DOS characters to show a map like old maze games did. I didn't find anything in the HTML special character reference. Is there a way to use these characters in HTML ?
Thanks in advance.
With the right Unicode characters, the old character encodings shouldn't make much odds. The tricky bit may be converting existing ASCII art into Unicode - at which point you need to know the original encoding.
The relevant code charts will be listed on the Unicode "symbols" charts page. In particular, I suspect you'll find the box drawing and block elements charts useful.
You'll need to make sure that your page uses a font which contains the right characters, of course...
As an example, you can render this:
┌┐
└┘
With:
<pre>┌┐
└┘</pre>
Not quite a proper box, but getting there...
You can send them in the <pre> tags, although in XHTML you'll need to encapsulate it in <![CDATA[[]> I think. Be careful though, not all encodings render this correctly. For example, a lot of ASCII art designed for DOS code page 430 (US) fails over here in the UK (830). Eastern Europe suffers especially.
I think the best approach here would be to render images.
EDIT: Oh. You could try , but I'm not sure if that would work.