How can XSS and CSRF be prevented?

How can XSS and CSRF be prevented?

From the Titas Gas Assistant Engineer (CSE) May 2024 – Written (BUET) exam, question 3 of 14.

More from this paper