Modify the style of paragraph on Click button

T
Talel Ben Belgacem

Here is a sample html file with a submit button. Now modify the style of the paragraph text through javascript code.

HTML code:

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS DOM paragraph style</title>
</head>
<body>
<p id ='text'>JavaScript Exercises - w3resource</p>
<div>
<button id="jsstyle"
onclick="js_style()">Style</button>
</div>
</body>
</html>