<style> : Style Information element

Introduction

The <style> element in HTML is used to embed CSS (Cascading Style Sheets) directly within an HTML document. It allows you to define the presentation and layout of elements on the webpage.

Here’s an example of how you might use it:

Output :

In this example , we can change the background colour , heading colour and font size of the text written in <p> tag.

Like <script> tag we can also write <style> in between <head> , <body> tags and also by making a different file of CSS and link with HTML document.

How we can make our webpage stylish we can study it in the CSS language.

Leave a Comment