const customStyle = { color: "red", fontSize: "20px", border: "1px solid black" } customStyle.color = "blue"; ReactDOM.render( <div> <h1 style={customStyle}> inline stly css practice </h1> // alternative method not recomended <h1 style={ color: "red", fontSize: "20px", border: "1px solid black"}> inline stly css practice </h1> </div>, document.getElementById("root"))
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter