An Interest In:
Web News this Week
- April 17, 2024
- April 16, 2024
- April 15, 2024
- April 14, 2024
- April 13, 2024
- April 12, 2024
- April 11, 2024
April 17, 2024 07:15 am GMT
Original Link: https://dev.to/fatimaalam1234/html-interview-questions-899
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";
Original Link: https://dev.to/fatimaalam1234/html-interview-questions-899
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To