Tutorials

KodeKite Tools

HTML
Flexbox
SVG
Canvas
HTML Tutorial

More


HTML Entities
Entities

Some characters are reserved in HTML and they have special meaning when used in HTML document. For example, you cannot use the greater than and less than signs or angle brackets within your HTML text because the browser will treat them differently and will treate them as html tags.

Syntax

&entity name;

Or

&#entity number;


You can apply entities to any element and use any where within a HTML document.


Example

Trademark™


Entities List
Entity Name Entity Number Description Output
" " Quotation Mark "
&lt; &#60; Less Than <
&gt; &#62; Greater Than >
&apos; &#39; Apostrophe '
&amp; &#38; Ampersand &
&copy; &#169; Copyright ©
&nbsp; &#160; Non breaking space  
&laquo; &#171; Angle quotation mark «
&reg; &#174; Registered trademark ®
&trade; &#8482; Trademark
&deg; &#176; Degree °
&plusmn; &#177; Plus or minus ±
&raquo; &#187; Angle quotation mark »
&times; &#215; Multiplication ×
&divide; &#247; Division ÷
&hellip; &# ; Horizontal ellipsis
&lsaquo; &#8249; Single left pointing
&rsaquo; &#8250; Single right pointing

The Symbols in above table are common and important symbols used in HTML document.


Practice Task

Open notepad or any other text editor, follow the following points.


  • Use some of entities from above table and create basic HTML document structure
  • Use <br /> element to break line or go to new line

save file with name task.html or task.htm and then open it using any browser and see results.


Solution

<!DOCTYPE html>
<html>
<head>
<title>HTML basic structure Task</title>
</head>
<body>
Content here
</body>
</html>