Inline CSS
Detects the use of inline CSS, which can affect performance.
What is this check?
Inline CSS refers to styling rules that are applied directly to an HTML element using the `style` attribute.
Why is it important?
While sometimes necessary, excessive use of inline CSS is bad practice. It adds to the HTML file size, cannot be cached by the browser separately from the HTML, and makes code harder to maintain.
What is the impact?
It can increase page load times and makes managing your website's styling more difficult. It's better to use external stylesheets.
Example Implementation
<!-- Inline CSS (Avoid for most cases) -->
<p style="color: blue; font-size: 16px;">Hello</p>
<!-- Better: Use a class and external CSS -->
<p class="info-text">Hello</p>
/* in styles.css */
.info-text { color: blue; font-size: 16px; }