javascript font attribute
Translation results:
UK[fɒnt] US[fɑ:nt]
n. Font; font; baptistery (located in a church, often made of stone); (same font and size) a set of typefaces
Plural: fonts
javascript font attributesyntax
Function:Set all font attributes.
Syntax: Object.style.font=value
javascript font attributeexample
<html> <head> <meta charset="UTF-8"> <script type="text/javascript"> function setFont() { document.getElementById("p1").style.font="italic bold 12px arial,serif"; } </script> </head> <body> <p id="p1">这是示例文字</p> <input type="button" onclick="setFont()" value="Change paragraph style" /> </body> </html>
Run instance »
Click the "Run instance" button to view the online instance
Popular Recommendations
- Xiaomi launches new transparent power bank with 212W fast charging support
- Valve is testing ARM64 support for popular games, sparking speculations about future hardware
- Lenovo Legion Go Gen 2 gaming handheld officially mentioned for the first time in company brochure
- Deal | Unbeatable 66% discount on Samsung\'s 42-inch OLED 4K S90D HDR Smart TV with 144Hz - Lowest price ever
- Alleged early Meta Quest 3S ad suggests that the VR headset will be affordable
- Deal | 2024 Asus ROG Zephyrus G16 with RTX 4080 and gorgeous OLED display drops to all-time low