What is <style> tag and why it is used inside HTML document?


<style> tag is used to add internal stylesheet in an HTML document.

<style> tag can be added inside <head> or <body> element. But it is recommended to include them inside <head> tag for organizational purpose.

You are free to define multiple <style> elements in a single HTML document. They will be applied in the same order they are included in the document.

<!doctype html> 
      p {
        color: red;
    <p>This is my paragraph</p>

Share and support us

Share on social media and help us reach more people