Skip to content

Commit

Permalink
Add example from HTML & CSS intro
Browse files Browse the repository at this point in the history
  • Loading branch information
richardolsson committed Sep 30, 2024
1 parent d47a01e commit bb5462e
Showing 1 changed file with 42 additions and 14 deletions.
56 changes: 42 additions & 14 deletions classes/a2/a201/examples/html-and-css.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,48 @@
<html>
<head>
<meta charset="UTF-8">
<style>
</style>
</head>
<body>
<h1>Rubrik A</h1>

<head>
<meta charset="UTF-8">
<style>
h1 {
font-size: 16px;
}

.my-special-element {
color: green;
}

#container > .my-special-element {
background-color: skyblue;
}

p:first-of-type {
border: 1px solid black;
}

h2 + p {
margin-top: 100px;
}

a {
color: red;
}
</style>
</head>

<body>
<div id="container">
<h1 class="my-special-element">Rubrik A</h1>
<h2>Rubrik B</h2>
<p>
En brödtext med <a href="https://google.se">
<p class="paragraph">
En brödtext med <a class="my-special-element" href="https://google.se">
en länk till svenska Google</a>
och lite mer text.
och lite mer text.
</p>
<p>En brödtext</p>
<a href="https://google.com">
<p class="my-special-element"">En brödtext</p>
<a href=" https://google.com">
Klicka här för amerikanska Google
</a>
</body>
</a>
</div>
</body>

</html>

0 comments on commit bb5462e

Please sign in to comment.