start learning
Image 1
3HTMLSymbols

HTML Symbols

HTML symbols, also known as character entities or HTML entities, are special codes used to represent characters that have special meaning in HTML markup. These symbols are often used to display characters that cannot be easily typed or represented directly in HTML code.

Here are some commonly used HTML symbols along with their short definitions:

  1. & - Ampersand: Represents the "and" symbol (&).
  2. < - Less than: Represents the less-than symbol (<).
  3. > - Greater than: Represents the greater-than symbol (>).
  4. " - Quotation mark: Represents the double quotation mark (").
  5. ' - Apostrophe: Represents the single quotation mark ('), also known as an apostrophe.
  6. - Non-breaking space: Represents a space character that prevents line breaks between words.
  7. © - Copyright symbol: Represents the copyright symbol (©).
  8. ® - Registered trademark symbol: Represents the registered trademark symbol (®).
  9. - Trademark symbol: Represents the trademark symbol ().

There are many more symbols available for various purposes, such as mathematical symbols, currency symbols, arrows, and more.

few examples of HTML symbols along with their clarification:


& - Ampersand

In HTML, the ampersand symbol (&) is reserved for representing special characters and entities. To display an actual ampersand symbol, you need to use the HTML entity &.


<p>This is an example of using the ampersand symbol: &</p>

Preview :
This is an example of using the ampersand symbol: &

< - Less than:

Clarification: The less-than symbol (<) is used to indicate the beginning of an HTML tag. To display an actual less-than symbol, you need to use the HTML entity <.


<p>This is an example of using the less-than symbol: 5 < 10</p>

Preview :
This is an example of using the less-than symbol: 5 < 10

> - Greater than:

Clarification: The greater-than symbol (>) is used to indicate the end of an HTML tag. To display an actual greater-than symbol, you need to use the HTML entity >.


<p>This is an example of using the greater-than symbol: 10 > 5</p>

Preview :
This is an example of using the greater-than symbol: 10 > 5

" - Quotation mark:

Clarification: The quotation mark (") is often used to enclose attribute values in HTML tags. To display an actual quotation mark, you need to use the HTML entity ".


<p>This is an example of using quotation marks: "Hello, world!"</p>

Preview :
This is an example of using quotation marks: "Hello, world!"

' - Apostrophe:

Clarification: The apostrophe (') is used to represent a single quotation mark. It is primarily used when you need to include a quotation mark within a string that is already enclosed in double quotation marks. To display an actual apostrophe, you can use the HTML entity '.


<p>This is an example of using an apostrophe: I don't like mushrooms.</p>

Preview :
This is an example of using an apostrophe: I don't like mushrooms.