neocities/views/tutorial/html/4.erb

24 lines
972 B
Text

<div class="comic" style="height: 600px; margin-top:1em; background-image: url(/img/tutorial/ch1pg4.png); background-size: 489px;">
<div class="dialogue" style="left: 70px; width: 170px">
Now let's add a paragraph of text below the <strong>h1</strong> heading. Perhaps "Welcome to my website" or your favorite quote.
</div>
<div class="dialogue" style="left: 295px; top: -10px">
To make a paragraph, surround your text with the <strong>&lt;p&gt;</strong> tag. So it should look something like
<strong>&lt;p&gt;Hello!&lt;/p&gt;</strong>
</div>
</div>
<script>
function checkHomework() {
var html = editor.getValue()
var match = '<html.+>.+<body>.+<h1>.+</h1>.+<p>.+</p>.+</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/5')
}
}
</script>