Sep 1, 2026

Introduction: Escape Characters | Comment

Character Entities (Escape Characters)

 ​Character entities are used when you need to display reserve characters that browsers would otherwise interpret as HTML code, or characters not readily available on a standard keyboard.

Character

Description

Numeric Entity

Named Entity

Common Use Case

"

Quotation mark

"

"

Used inside attribute values or text

&

Ampersand

&

&

Used to display bare ampersands in text

<

Less-than (left angle bracket)

&#060;

&lt;

Prevents browser from mistaking as tag start

>

Greater-than (right angle bracket)

&#062;

&gt;

Prevents browser from mistaking as tag end

Non-breaking space

&#160;

&nbsp;

Forces a space without line wrapping

©

Copyright symbol

&#169;

&copy;

Footer copyright notices


​Comment 

Syntax: Opens with <!-- and closes with -->.

​It's ignored by the browser and will not appear on the page.

​Comments are still visible to anyone viewing the web page's raw source code. 

Never place sensitive information (passwords, private keys, API credentials) inside HTML comments.

​Primary Uses:

​Documentation: Labeling major section starts/ends (e.g., <!-- Start Header -->).

​Developer Notes: Recording who modified code, dates, or layout reasons.

​Debugging: Temporarily disabling lines of code without deleting them.


No comments:

Post a Comment

Thank you to visit Bapi's Page.