3.6 Entities

3.6 HTML Entities

Some characters are reserved in HTML. If you use the less than(<)or greater than(>) signs in your text the browser might mix them with tags. Character entities are used to display reserved characters in HTML.
To display a less than sign(<) we must write:&lt; or &#60;
Character Entity Reference Chart:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> Entities</title> </head> <body> <p> some &nbsp; text</p> <p> some &#160; text</p> <p>4 &lt; 5</p> <p> Facebook &copy;</p> </body> </html>

Previous Section

3.5 Tables

Next Section

3.7 Forms
Copyright © 2021 Code 4 Tomorrow. All rights reserved. The code in this course is licensed under the MIT License. If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact classes@code4tomorrow.org for inquiries.