mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
41 lines
1.7 KiB
Text
41 lines
1.7 KiB
Text
<div class="comic" style="height: 600px; background-image: url(/img/tutorial/ch1pg2.png);">
|
|
<div class="dialogue" style="left: 25px; top: 25px; 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 class="dialogue" style="left: 370px; top: 0px;">
|
|
And here's some HTML, right in this box! Let's make a change. Replace <strong>Hello World</strong> with <strong>The Website of <span id="studentName"></span></strong>, and click save!
|
|
</div>
|
|
<div class="dialogue" style="left: 370px; top: 230px;">
|
|
<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">
|
|
<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 = 'The Website of '+storedName
|
|
$('#studentName').text(storedName)
|
|
|
|
function checkHomework(editor) {
|
|
var html = editor.val()
|
|
|
|
var match = '<html>.+<body>.+'+answer+'.+</body>.+</html>'
|
|
var re = new XRegExp(match, 'gis')
|
|
|
|
if(html.match(re) === null) {
|
|
alert("That's not right! Try again.")
|
|
} else {
|
|
alert('Great, you did it!')
|
|
sessionStorage.setItem('tutorialHtml', html)
|
|
window.location.href = '/tutorial/html/3'
|
|
}
|
|
}
|
|
</script>
|