Do you think IIT Guwahati certified course can help you in your career?
No
Introduction
HTML entities are special codes used to display reserved characters, symbols, or spaces that cannot be typed directly in HTML. These entities are useful for showing symbols like <, >, &, and non-breaking spaces without causing HTML errors. They help improve content readability and compatibility across different browsers.
In this article, we will discuss different categories of HTML entities, including ASCII characters, ISO 8859-1 characters, math symbols, Greek letters, and miscellaneous symbols.
ASCII Characters
ASCII (American Standard Code for Information Interchange) characters are the most commonly used characters in computing. These include letters, numbers, punctuation marks, and control characters.
Common ASCII Entities
< <!-- Represents '<' (less than) -->
> <!-- Represents '>' (greater than) -->
& <!-- Represents '&' (ampersand) -->
" <!-- Represents '"' (double quote) -->
' <!-- Represents "'" (single quote) -->
Example
<!DOCTYPE html>
<html>
<head>
<title>ASCII Entities Example</title>
</head>
<body>
<p>5 < 10 is a true statement.</p>
<p>Use & to represent the ampersand symbol.</p>
</body>
</html>
Output:
ISO 8859-1 Characters
ISO 8859-1, also known as Latin-1, includes characters used in Western European languages. These characters include special letters with accents and additional punctuation marks.
HTML entities are used to display special characters that might otherwise be interpreted as code, such as < and &, or to insert symbols that are not available on a standard keyboard.
Yes, most HTML entity names are case-sensitive. For example, Α and α represent different characters.
Conclusion
In this article, we learned the HTML Entities List, which helps in displaying special characters correctly in web pages. We discussed various commonly used entities for symbols, mathematical operators, and reserved characters. Understanding HTML entities is essential for ensuring proper text rendering and avoiding issues related to character encoding in web development.