Solution for problem 1 of foundations css exercise

This commit is contained in:
Suvansarkar 2023-08-02 17:55:57 +05:30
parent 320c1642b6
commit 358e38ca31
2 changed files with 19 additions and 1 deletions

View File

@ -5,10 +5,19 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Methods for Adding CSS</title> <title>Methods for Adding CSS</title>
<link rel="stylesheet" href="style.css">
<style>
p {
background-color: green;
color: white;
font-size: 18px;
}
</style>
</head> </head>
<body> <body>
<div>Style me via the external method!</div> <div>Style me via the external method!</div>
<p>I would like to be styled with the internal method, please.</p> <p>I would like to be styled with the internal method, please.</p>
<button>Inline Method</button> <!-- an orange background and a font size of 18px -->
<button style="background-color: orange; font-size: 18px;">Inline Method</button>
</body> </body>
</html> </html>

View File

@ -0,0 +1,9 @@
/* a red background, white text, a font size of 32px, center aligned, and bold */
div {
background-color: red;
font-size: 32px;
color: white;
text-align: center;
font-weight: bold;
}