Beispiel:CSS-Einstieg-4.html

Aus SELFHTML-Wiki
Wechseln zu: Navigation, Suche

<!DOCTYPE html> <html lang="de">

 <head>
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <link rel="stylesheet" media="screen" href="./Beispiel:SELFHTML-Beispiel-Grundlayout.css">

<title>CSS-Einstieg - 4</title>

   <style>

main h1 {

 margin: 0;
 padding: 0;
 border: 0 none;
 border-radius: 0;
 background: none;
 background-color: green;
 color: white;

} p {

 text-align: center; 
 color: green;

}

.grey {

 background: grey;

}

.darkgrey {

 background: darkgrey;

}

.boxes {

 display: flex;
 gap: 1rem;
 width: calc(100% - 1.5rem);

}

.box {

 aspect-ratio: 1;
 border-radius: 3px;
 display: grid;
 place-items: center;
 width: 150px;

}

   </style>

</head> <body>

CSS-Einstieg - 4

 <main>	

CSS-Spielwiese - 4

Dies ist ein Absatz.

Alle Absätze werden über ein Style-Element im head formatiert.

Dies ist noch ein Absatz.


Farbnamen sind nicht immer logisch:

grey
darkgrey


 </main>

</body> </html>