CodeZettaInterview Hub

HTML · Security · Fresh / Intern · Concept

How does HTML contribute to XSS defense?

Short Interview Answer

Escape untrusted text, use textContent, sanitize HTML, avoid dangerous sinks.

Detailed Explanation

Framework auto-escaping helps but bypasses exist (href javascript:, style, nested contexts).

Did you know this answer?