- باستخدام CSS، يمكنك التحكم في اللون والخط وحجم النص والمسافة بين العناصر وكيفية وضع العناصر وتخطيطها، وما هي صور الخلفية أو ألوان الخلفية التي سيتم استخدامها، وشاشات مختلفة لأجهزة وأحجام شاشات مختلفة، وأكثر من ذلك بكثير!
مثال :
<!-- Inline CSS -->
<h1 style='color:blue;'>A Blue Heading</h1>
<p style='color:red;'>A red paragraph.</p>
<!-- Internal CSS -->
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
<!-- External CSS -->
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' href='styles.css'>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
<!-- styles.css -->
body {
background-color: powderblue;
}
h1 {
color: blue;
}
p {
color: red;
}