CRITICAL
Rule Definition
Using style sheets (*.css) instead of hardcoded style definitions improves redeability and is less costly to maintain.
Remediation
Modify the source code to reduce the number of web pages with hardcoded style definitions and no link to a css style sheet.
Violation Code Sample
<?php echo "Text"; ?>
<html>
<head>
<title>...</title>
<style>
/*violation*/
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
</head>
<body>
</body>
</html>
Fixed Code Sample
<?php echo "!!!A Title - Uses css file!!!"; ?>
<html>
<head>
<title>...</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
</body>
</html>
Related Technologies
Technical Criterion
Architecture - Reuse
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.