Insert emoticon in HTML

How to insert emoticon in HTML programmatically? I want to know logic, how does it exist with text? Is it an ASCII character style or something else? thanks in advance.

+3
source share
5 answers

Assuming you mean the emoticons found in various forums, you simply replace the ASCII emoticon with an HTML element imgon the server side. The result will look like this:

<p>This is a paragraph <img src="wink.png" alt=";)"></p>

In most cases, this is achieved using, for example, PHP str_replace.

+5
source

Paste in the html document to display the emoticon.

It turns out like this: ☺

, (. http://en.wikipedia.org/wiki/Smiley)

+15

; , , 0. , .

, , ASCII. . , / HTML -.

Hello world <img src="smileyface.png" alt="smiley face" />!
+1

, - . html javascript.

TinyMCE. , , : http://tinymce.moxiecode.com/

0

There are many UTF-8 characters in HTML. Look below enter image description here

0
source

Source: https://habr.com/ru/post/1779329/


All Articles