Unlike Snap!, which is a general purpose programming language that can be used to develop a variety of algorithms, HTML is a special purpose programming language; it's designed for one specific task: designing web pages. HTML controls the layout and style of text and images on a webpage, but it doesn't allow for real programming like Snap! does. People use other languages like JavaScript to program algorithms into websites.
The fundamental skeleton of every HTML webpage looks like the code below. Browsers use HTTP to turn the HTML into the site you see. Notice that most of the HTML tags (like <head>
) have a closing tag (like </head>
) designating the end, and the relevant content goes between the two tags. (The color and indentation improve readability but are not necessary.)
<!DOCTYPE html> <html> <head> <title>The Page Title Goes Here</title> </head> <body> The page content goes here. </body> </html>
<body>
and </body>
tags. You might add a second heading and more paragraphs.
<h3></h3>
tags. (Try numbers 1-6.)<p></p>
.<a href="http://bjc.edc.org">BJC Website</a>
<!--
and -->
tags:<!-- This is a comment. -->
myFunction
. It's like in Snap!.
; var
creates the new variable, and =
is like set
in Snap!.