Beispiel:CSS2 color.html
Aus SELFHTML-Wiki
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>color für Textfarbe</title>
<style>
h1 {
color: #abc;
}
h2 {
color: #abc;
background-color: #000;
}
p {
color: green;
font-weight: bold;
}
a {
color: #de5410;
}
a:visited {
color: rgb(153 68 0);
}
p span {
color: hsl(240 100% 50%);
}
h1 { font-family: Garamond, serif;
font-weight: normal;
margin-bottom: 4em;
text-align: center;
container-type: inline-size;
}
#eins {
font-size: 10cqw;
}
#zwei {
font-size: 16cqw;
}
main {
overflow: auto; /* overflow is needed */
resize: horizontal;
width: 90%;
border: thin dotted !important;
}
body {
font-family: arial, sans-serif;
-webkit-print-color-adjust: economy;
print-color-adjust: economy;
}
@page {
border: thin dashed;
@top-center-corner {
content: "TCC."
}
@top-center {
content: "TC"
}
}
</style>
</head>
<body>
<main contenteditable>
<h1><span id="eins">
gute und interessante
</span>
<span id="zwei">
Überschriften
<span>
</h1>
<p> <a href="https://wiki.selfhtml.org">Verweise</a> werden von den meisten Browsern
in <span>blauer Farbe</span> dargestellt. Wenn das <a href="https://wiki.selfhtml.org/wiki/Glossar">Verweisziel</a> bereits besucht wurde, ändert sich die <span>Farbe</span> des Links. </p>
<h2>color + background-color</h2>
</main>
<p>Sie können die Box unten rechts größer und kleiner ziehen.</p>
</body>
</html>