Reputation: 1257
I stumped on this website with some strange text. The format was kept when I copied and I could not get rid of them. Even when I create a folder and pasted the text as folder name, the format was still there.
I also tried with JS, didn't work either.
What is this? How can I produce it with html?
Upvotes: 2
Views: 111
Reputation: 943098
Symbols displayed on webpages, and in any other text in computing, are represented as positions in a character set. Today, this is most commonly Unicode.
For example:
a
is U+0061 : LATIN SMALL LETTER A
&
is U+0026 : AMPERSAND {and}
😱
is U+1F631 : FACE SCREAMING IN FEAR
The characters you are looking at are Mathematical Alphanumeric Symbols.
𝑨
is U+1D468 : MATHEMATICAL BOLD ITALIC CAPITAL A
They are designed for use in formulas and the like when writing about maths and science.
Due to the history of maths and science, they look like regular letters, sometimes with specific formatting.
However, they are not regular letters and while using them like that will look cute for people reading the webpage they will cause major accessibility problems when they interact with (for example) screen readers and search engine indexing robots.
Kent C. Dodds has a video demonstrating the problem which I highly recommend.
While you can generate them (e.g. by copy/pasting them from somewhere that uses them, or writing a program that outputs something based on its code point) you should not (see above). Use CSS to format your text instead.
Upvotes: 5