HTML and CSS Reference
In-Depth Information
Code
Explanation
The <a href="maze.html">Maze</a> program is a
multi-stage game. The player builds a maze by
using the mouse to build walls. The player then
can move a token through the maze. The player
can also save the maze on the local computer
using a name chosen by the player and retrieve
it later, even after closing the browser or
turning off the computer.
See previous. This paragraph contains the
hyperlink to maze.html.
Closing
p
tag
</p>
</body>
Closing
body
tag
</html>
Closing
html
tag
The Favorite Site code has the features of the annotated list with the addition of formatting: a green box
around each item and a picture in each item. See Table 1-2.
Table 1-2.
The Favorites Sites Code
Code
Explanation
<html>
Opening
html
tag
<head>
Opening
head
tag
<title>Annotated links</title>
Complete
title
element: opening and closing tag and
Annotated links in between
<style>
Opening
style
tag. This means were now going to use
CSS.
Article {
Start of a style. The reference to what is being styled is all
section
elements. The style then has a brace - {. The
opening and closing braces surround the style rule were
creating, much like opening and closing tags in HTML.
The
width
is set to 60% of the containing element. Note
that each directive ends with a ; .
width:60%;
text-align:left;
Text is aligned to the left
margin:10px;
The margin is 10 pixels