mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
48 lines
2 KiB
Text
48 lines
2 KiB
Text
<div class="comic" style="height: 608px; width:320px; background-image: url(/img/tutorial/ch1pg2.png); background-size: 320px; float: left;">
|
|
<div class="dialogue" style="left: 25px; top: 40px; width: 250px">
|
|
<p>All you need to build your first site is a computer language called HTML.</p><p>HTML is made of tags - there's usually an opening tag and a closing tag, with content in between them.</p>
|
|
</div>
|
|
</div>
|
|
<div class="comic" style="width: 289px;
|
|
height: 588px;
|
|
background-image: url(/img/tutorial/ch1pg2_2.png);
|
|
background-size: 289px;
|
|
position: absolute;
|
|
right: -47px;
|
|
top: 0;
|
|
z-index: 1000;">
|
|
<div class="dialogue" style="left: 0px; top: 40px;">
|
|
And here's some HTML, right in this box! Let's make a change. Replace <strong>Hello World</strong> with <strong><span id="studentName"></span>'s Website</strong>, and click save!
|
|
</div>
|
|
<div class="dialogue" style="left: -10px; top: 360px;">
|
|
<p>You'll see the results here.</p>
|
|
<p>Make sure to check the green boxes below for important bonus info!</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="welcome" style="clear: both">
|
|
<h4>Welcome to HTML!</h4>
|
|
<p>HTML stands for <strong>H</strong>yper<strong>T</strong>ext <strong>M</strong>arkup <strong>L</strong>anguage.
|
|
Hypertext refers to text that has links, and markup refers to the tags.</p>
|
|
|
|
<p>Don't worry if anything seems confusing - you'll get the hang of it once you try coding! If you ever get stuck, click the <strong>Help</strong> link below.</p>
|
|
</div>
|
|
|
|
<script>
|
|
var storedName = sessionStorage.getItem('name')
|
|
var answer = storedName+ "'s Website"
|
|
$('#studentName').text(storedName)
|
|
|
|
function checkHomework() {
|
|
var html = editor.getValue()
|
|
var match = '<html.+>.+<body>.+'+answer+'.+</body>.+</html>'
|
|
var re = new XRegExp(match, 'gis')
|
|
|
|
if(html.match(re) === null) {
|
|
notok("That's not right! Try again.")
|
|
} else {
|
|
sessionStorage.setItem('tutorialHtml', html)
|
|
ok('Great, you did it!', '/tutorial/html/3')
|
|
}
|
|
}
|
|
</script>
|