org.sonar.l10n.web.rules.Web.InlineStyleCheck.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-web-plugin Show documentation
Show all versions of sonar-web-plugin Show documentation
Analyze HTML (also within PHP/Ruby/etc. templates) and JSP/JSF code.
The newest version!
The goal of this rule is to ban the usage of HTML "style" property to make sure that all CSS styles are defined in CSS classes.
Consolidating all styling into classes makes it easier to read, understand and maintain.
Noncompliant Code Example
<body>
<h1 style="color: blue;">Hello World!</h1> <!-- Noncompliant -->
Compliant Solution
<head>
<style>
h1 {
color: blue;
}
</style>
</head>
<body>
<h1 style="color: blue;">Hello World!</h1>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy