HTML <style> Tag

Example Use of the <style> element in an HTML document: <html> <head> <style> h1 {color:red;} p {color:blue;} </style> </head> <body><h1>A heading</h1> <p>A paragraph.</p></body> </html> Try it Yourself » Definition and Usage The <style> tag is used to define style information for an HTML document. Inside the <style> element you specify how HTML elements should render in a […]

HTML <script> Tag

Example Write “Hello JavaScript!” with JavaScript: <script> document.getElementById(“demo”).innerHTML = “Hello JavaScript!”; </script> Try it Yourself » Definition and Usage The <script> tag is used to define a client-side script (JavaScript). The <script> element either contains scripting statements, or it points to an external script file through the src attribute. Common uses for JavaScript are image manipulation, form […]