Empty elements
Some elements (empty elements or void elements) have a single tag, to say "put this item here". Here are a few examples:
-
A horizontal rule element (tag name
hr
) is used to designate a change in the content. (Caution: Do not use this element for styling and do not overuse it.) -
A line break element (tag name
br
) is used to insert a line break. (Caution: Do not use this element to start a new paragraph.) -
An image element (tag name
img
) is used to include an image.
Glimpse of the future
We will discuss images in more detail in an upcoming discussion on attributes, once we've learned how to indicate which image to include. As you can see in the example, without that information there isn't yet much to see.
Note:
Hints:
- undefined
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
<html>
<head>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX