According to the HTML5 spec, non-scoped <style> elements can go basically anywhere in the <head>.

Answer from phihag on Stack Overflow
🌐
W3Schools
w3schools.com › css › css_howto.asp
How to add CSS
Add External CSS Add Internal CSS Add Inline Style Multiple Style Sheets Code Challenge CSS Comments CSS Errors CSS Colors
🌐
W3Schools
w3schools.com › html › html_css.asp
HTML Styles CSS
An internal CSS is defined in the <head> section of an HTML page, within a <style> element.
🌐
Simplilearn
simplilearn.com › home › resources › software development › understand all about internal css
Understand all about Internal CSS | Simplilearn
November 18, 2025 - An internal CSS is used to define a style for a single HTML page. It is defined in the section of an HTML page, within a element. Read More to understand better.
Address   5851 Legacy Circle, 6th Floor, Plano, TX 75024 United States
🌐
HubSpot
blog.hubspot.com › home › website › how to add css to html: understanding inline, internal & external css
How to Add CSS to HTML: Understanding Inline, Internal & External CSS
March 13, 2023 - Inline CSS affects only the element of the tag (and possible child elements depending on the property that’s applied). Internal CSS is written inside a <style> element, which goes inside the <head> of the HTML document.
🌐
Code Institute
codeinstitute.net › blog › css › internal css
Internal CSS: What is it and When to Use - Code Institute Global
April 24, 2023 - Internal CSS may be used to style a single web page as a whole, but not multiple web pages. Multiple web pages can be styled using the same code. The CSS coding for the webpage is stored in an internal stylesheet in the file’s head section. Reusing the code makes it simple to add styles like groups or ID numbers.
🌐
Hostinger
hostinger.com › home › tutorials › types of css: inline, external and internal definitions and differences explained
Types of CSS: Inline, Internal and External CSS Explained
April 23, 2025 - Inline CSS styles are included within the HTML document and are specific to individual HTML elements, allowing for targeted styling. Internal CSS styles are included within the head section of an HTML document and apply to the entire document, ...
🌐
GeeksforGeeks
geeksforgeeks.org › css › internal-css
Internal CSS - GeeksforGeeks
June 24, 2024 - Example 2: In this example, we are using internal CSS to style a page with a green heading, a blue paragraph, and a centered red button that changes color on hover. The button also includes a link to the GeeksforGeeks website. ... <!DOCTYPE html> <html> <head> <title>Internal CSS</title> <style> /* Internal CSS starts here */ h1 { color: green; text-align: center; font-size: 50px; } p { font-size: 25px; color: blue; text-align: center; } .container { text-align: center; } .btn { background-color: red; color: white; border-radius: 5px; padding: 10px 20px; text-decoration: none; } .btn:hover { background-color: #0056b3; } </style> </head> <body> <h1>GeeksforGeeks</h1> <p>A Computer Science Portal..!</p> <div class="container"> <a href="https://www.geeksforgeeks.org/" class="btn">Click Me</a> </div> </body> </html>
Find elsewhere
🌐
DEV Community
dev.to › kathirvel-s › css-basics-inline-internal-and-external-css-explained-1di4
CSS Basics - Inline, Internal, and External CSS Explained - DEV Community
January 6, 2026 - Internal CSS: Internal CSS is written inside a <style> tag within the <head> section of an HTML page.
🌐
Allthingsprogramming
allthingsprogramming.com › home › blog › internal css
Internal CSS - All Things Programming
June 11, 2025 - CSS written inside a <style> tag in the <head> section of the same HTML file. ... What it is: CSS saved in a separate .css file and linked to the HTML document using a <link> tag.
🌐
DEV Community
dev.to › aj_arul › what-is-internal-css-1759
What is Internal CSS? - DEV Community
October 28, 2025 - #beginners #css #html · ⦁ It is written inside the tag with in the <head> section of the html document.<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>Ex: &lt;html&gt; &lt;head&gt; &lt;style&gt; h1{ color:"blue"; ...
🌐
Allthingsprogramming
allthingsprogramming.com › home › blog › types of css
Types of CSS - All Things Programming
July 11, 2025 - Internal CSS is also called embedded CSS. It is written inside a <style> tag, which is placed within the <head> section of an HTML document.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Learn › CSS › First_steps › How_CSS_is_structured
How CSS is structured - Learn web development | MDN
The very first thing we need to do is to tell the HTML document that we have some CSS rules we want it to use. There are three different ways to apply CSS to an HTML document that you'll commonly come across — external stylesheets, internal stylesheets, and inline styles.
🌐
Medium
medium.com › softaai-blogs › what-are-the-3-types-of-css-inline-internal-and-external-explained-1dd56b7c0e8d
What Are the 3 Types of CSS? Inline, Internal, and External Explained | by amol pawar | softAai Blogs | Medium
July 17, 2025 - Breaks separation of concerns (HTML should structure, CSS should style). Makes your code messy and repetitive. Internal CSS means placing your styles within a <style> tag in the <head> section of your HTML document.
🌐
BitDegree
bitdegree.org › learn › internal-css
Using Internal CSS in HTML: Tips, Tricks, and Examples
June 11, 2019 - Internal CSS in HTML means adding CSS code in the <head> section of the document. Styling changes apply to every specific element found in the file. Tip: this is a solid option for one-page websites or when you cannot create external stylesheets ...
🌐
GeeksforGeeks
geeksforgeeks.org › css › difference-between-inline-internal-and-external-css
Difference between Inline, Internal and External CSS - GeeksforGeeks
July 23, 2025 - There are three primary methods to apply CSS: Inline CSS: Applied directly within an HTML element's style attribute, affecting only that specific element. Internal CSS: Defined within a <style> tag in the <head> section of an HTML document, ...
🌐
Codecademy
codecademy.com › article › html-inline-styles
Inline Styles in HTML: When to Use | Codecademy
Internal CSS (or embedded CSS) is added to the <head> section of an HTML document. It’s useful if you’re only stylizing a single page, and it helps keep everything in a single file, but it can also affect loading speeds.
🌐
DEV Community
dev.to › brendan_frasser › understanding-css-advantages-and-disadvantages-of-inline-internal-and-external-styles-glk
Understanding CSS: Advantages and Disadvantages of Inline, Internal, and External Styles - DEV Community
June 22, 2024 - Since developers have to style ... CSS is a way of applying CSS to a webpage that involves using a style tag in the head section of the HTML file....