JavaScript – Change the Width of Paragraph
To change the width of a paragraph using JavaScript, get reference to the paragraph element, and assign required width value to the element.style.width
property.
Example
Conclusion
In this JavaScript Tutorial, we learned how to change the width of a paragraph using JavaScript.