HTML Interview Questions

Q. How do you change the style of a HTML element
You can change inline style or classname of a HTML element using javascript

Using style property: You can modify inline style using style property
document.getElementById(“title”).style.fontSize = “30px”;
Using ClassName property: It is easy to modify element class using className property
document.getElementById(“title”).className = “custom-title”;


Discover more from Coursity

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

Discover more from Coursity

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top
Browse tons of food delivery options, place your order, and track it by the minute. Why choose a professional digital marketing agency ?. So why wait ? explore our **affordable linux vps hosting plans** today and take your projects to the next level !.