Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
We need character entities in HTML to display reserved symbols (like <, >, &$$, invisible spacing, special symbols, or characters that HTML otherwise uses for its own syntax.
Typing < or > directly in HTML can make the browser think you are beginning or ending a tag, rather than displaying the symbol, which can break the HTML structure.
By using the entity <, or numeric entities < or <.
The ampersand is displayed with &, or numerically as & or &.
The entity is and it is used to prevent automatic line breaks or collapsing of multiple spaces.
Use the entity " or the numeric entity " if you need a double quote inside an attribute value.
Use the numeric entity ₹ or the hexadecimal entity ₹ for the rupee symbol.
The named entity is ©.
It is better to use CSS for spacing and layout as is intended for preventing word breaks and not page design.
Write it as: If x < y & y < z.
You can use ', but the safest is the numeric entity ' as ' wasn't supported in older HTML versions.
Named entities like © are easy to remember and write, but numeric entities (like © or ©) can encode any Unicode character even if there's no named form.
It will display as: Marks: 98/100, with a space that does not collapse or allow a line break.
You must always escape <, >, and & even with UTF-8, because they are HTML syntax characters.
Use € to write the euro symbol.
Use <meta charset="UTF-8" />.
Use: Price: ₹ 499 — Limited offer!
Use –, which displays –.
<p title='He said "Hello" to me'>Hover me</p>
Character entities in attributes prevent conflicts or errors when special characters like quotes are needed inside attribute values.