HTML attributes in JavaScript

Notes:

How to use HTML attributes in JavaScript ?
While inserting html tags in JavaScript string, we need to be careful about assigning values to html attributes.
To assign values to html attributes use single quotes instead of double quotes.

Interview Questions: