blog 8 image

Most common HTML entities you will use

1 min read

Prequisite:
HTML
  • Simple basic understanding of HTML

      When writing in HTML, you have to follow the conventional tag structure and its keyword characters, and the same goes along with some other framework languages too, such as React, which writes similar to HTML tag structure. But what if you want to use some of the very same tags or the keywords within your document. For example, let's say you would like to display this <span>hello</span> tag within your UI. That is where it can become tricky. Because HTML uses the opening and closing tag as a special keyword character, and it will convert it. This is where HTML entities come in. They are a set of encodes which allow you to write anything within your UI. There are literally hundreds of them, but here is a list of the most common ones you will likely be using often.

// Most useful HTML entities
&#47; = / (Forward slash)
&#33; = ! (Exclamation mark)
&#40; = ( (Open parenthesis)
&#41; = ) (Close parenthesis)
&#44; = , (Comman)
&#58; = : (Colon)
&#59; = ; (Semi-colon)
&#63; = ? (Question mark)
&#91; = [ (Open bracket)
&#93; = ] (Close bracket)
&#92; = \ (Back slash)
&#95; = _ (underscore)
&#123; = { (Open curly brace)
&#125; = } (Close curly brace)
&#124; = | (Pipe)
&#160; =   (Empty space)
&#8208; = ‐ (Hyphen)
&#34; = " (Double quote)
&#39; = ' (Single quote)
&#96; = ` (Grave accent)
&#43; = + (Plus)
&#8722; = − (Minus)
&#61; = = (Equal)
&#60; = < (Less than)
&#62; = > (Greater than)
&#37; = % (Percentage)
&#8727; = ∗ (Asterisk)