HTML | DOM Style font Property
The HTML DOM Style’s font property is used to change the element’s font properties. It can be used to change the font style, weight, size, and family.
- To set the font style :
node.style.font = "font-properties font-size font-family;"
- To get the current font style:
Return Values: It returns a string value, which represents different font properties of the element
Property value: It is a string which has values like font properties, font size, and font family. The properties are required in the following order :
- Font style
- Font variant
- Font weight
- Font size
- Font height
- Font family
Supported Browsers: The browsers supported by DOM style.font property are listed below:
- Google Chrome 1 and above
- Internet Explorer 3 and above
- Edge 12 and above
- Firefox 1 and above
- Opera 3.5 and above
- Safari 1 and above
Please Login to comment...