HTML <style> Tag


The <style> tag is employed to specify the styling details (CSS) for a document.

Within the <style> element, you define the appearance of HTML elements when viewed in a web browser.

The <style> part needs to be placed within the <head>section of the document.

Tips and Notes

Note: When a browser goes through a style sheet, it arranges the HTML document based on the details mentioned in the style sheet. If certain characteristics are set for the same selector (element) in various style sheets, the browser will use the values from the last read style sheet (refer to the example below)!