startit/intro_html/index.html

126 lines
4.5 KiB
HTML
Raw Normal View History

2024-08-08 09:04:57 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=x, initial-scale=1.0">
2024-08-08 14:22:09 +02:00
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
2024-08-08 09:04:57 +02:00
</head>
<body>
<button>Ingen Layout</button>
<button>Vertikal layout</button>
<button>Horisontal layout</button>
<button>Grid layout</button>
<h1>Eksempel 1</h1>
2024-08-08 14:22:09 +02:00
<div id="cards">
<div class="card">
2024-08-14 14:52:08 +02:00
<div class="header green" onclick="green()">
2024-08-08 14:22:09 +02:00
Verktøy
</div>
</div>
2024-08-08 09:04:57 +02:00
</div>
2024-08-08 14:22:09 +02:00
<div class="card">
2024-08-14 14:52:08 +02:00
<div class="innerCard" id="inner">
2024-08-08 14:22:09 +02:00
</div>
2024-08-08 09:04:57 +02:00
</div>
2024-08-08 14:22:09 +02:00
<div id="cards">
<div class="card">
2024-08-14 14:52:08 +02:00
<div class="header blue" onclick="blue()">
2024-08-08 14:22:09 +02:00
HTML
</div>
</div>
2024-08-08 09:04:57 +02:00
</div>
2024-08-08 14:22:09 +02:00
<div class="card">
2024-08-14 14:52:08 +02:00
<div class="innerCard" id="inner">
2024-08-08 09:04:57 +02:00
Vi bruker HTML til å definere et dokument.
<ul>
<li>Tagger for grunnleggende oppsett av en HTML-fil</li>
<li>Tagger for grunnleggende formatering av tekst</li>
<li><tt>&lt;div&gt;</tt></li>
<li><tt>&lt;input type="text"&gt;</tt></li>
<li><tt>&lt;button&gt;</tt></li>
<li><a href="https://www.w3schools.com/html/default.asp" target="_new">W3Schools HTML Tutorial</a>
</li>
<li><a href="https://www.w3schools.com/tags/default.asp" target="_new">W3Schools HTML Reference</a>
</li>
</ul>
</div>
</div>
2024-08-08 14:22:09 +02:00
<div id="cards">
<div class="card">
<div class="header red">
CSS
</div>
</div>
2024-08-08 09:04:57 +02:00
</div>
2024-08-08 14:22:09 +02:00
<div class="card">
2024-08-14 14:52:08 +02:00
<div class="innerCard" id="inner">
2024-08-08 09:04:57 +02:00
Vi bruker CSS til å <i>style</i> et dokument, altså farger, fonter, utseende og lignende.
<ul>
<li><tt>background-color</tt></li>
<li><tt>color</tt></li>
<li><tt>padding</tt></li>
<li><tt>margin</tt></li>
<li><tt>border</tt></li>
<li><tt>text-align</tt></li>
<li><tt>font-size</tt></li>
<li><a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/" target="_new">Flexbox</a></li>
<li><a href="https://css-tricks.com/snippets/css/complete-guide-grid/" target="_new">Grid</a></li>
<li><a href="https://www.w3schools.com/css/default.asp" target="_new">W3Schools CSS Tutorial</a>
</li>
<li><a href="https://www.w3schools.com/cssref/default.asp" target="_new">W3Schools CSS Reference</a>
</li>
</ul>
</div>
</div>
2024-08-08 14:22:09 +02:00
<div id="cards">
<div class="card">
2024-08-14 14:52:08 +02:00
<div class="header yellow" onclick="openClose()">
2024-08-08 14:22:09 +02:00
JavaScript
</div>
</div>
<div class="card">
2024-08-14 14:52:08 +02:00
<div class="innerCard" id="inner">
2024-08-08 14:22:09 +02:00
Det viktigste vi skal lære er programmeringsspråket JavaScript. Vi skal lære grunnleggende programmering
ved
å manipulere HTML- og CSS-kode på en nettside ved hjelp av JavaScript.
<ul>
<li>Det finnes en W3Schools JavaScript Tutorial, men her anbefaler vi heller å følge kurset vårt på
Moodle.</li>
<li><a href="https://www.w3schools.com/jsref/default.asp" target="_new">W3Schools JavaScript
Reference</a></li>
</ul>
</div>
2024-08-08 09:04:57 +02:00
</div>
</div>
2024-08-08 14:22:09 +02:00
<div id="cards">
<div class="card">
<div class="header dark">
Hode, kropp og ben
</div>
</div>
<div class="card">
<div id="head" class="bodyPart">
<button onclick="selectHead4()"></button>
<img src="img/head1.png">
<button onclick="selectHead2()"></button>
</div>
<div id="body" class="bodyPart">
<button onclick="selectBody4()"></button>
<img src="img/body1.png">
<button onclick="selectBody2()"></button>
</div>
<div id="legs" class="bodyPart">
<button onclick="selectLegs4()"></button>
<img src="img/legs1.png">
<button onclick="selectLegs2()"></button>
</div>
2024-08-08 09:04:57 +02:00
</div>
</div>
</body>
</html>