1<!DOCTYPE html>
2<html>
3<body>
4
5<p id="demo">This is an example paragraph.</p>
6
7<button type="button" onclick="myFunction()">Transform text</button>
8
9<script>
10function myFunction() {
11 document.getElementById("demo").style.textTransform = "capitalize";
12}
13</script>
14
15</body>
16</html>
17