ptg16476052
Workshop 69
4
Q Is the
tag the general-purpose tag for use when styling a page?
A No. The
tag is the general-purpose tag for containing content on a page. The
tag is intended specifically to hold paragraphs of text. There are many tags
that are not valid when placed within a
tag, including
. You’ll learn more
about
about
in Lesson 7, “Formatting Text with HTML and CSS.”
Q Is it possible to put HTML tags inside comments?
A Yes, you can enclose HTML tags within comments, and the browser will not dis-
play them. In fact, it’s common to use comments to temporarily hide sections of a
page, especially when testing things. Programmers (and web developers) generally
refer to this as “commenting it out.”
Quiz
- What three HTML tags are used to describe the overall structure of a web page,
and what do each of them define? - Where does the
tag go, and what is it used for? - How many different levels of headings does HTML support? What are their tags?
- Why is it a good idea to use two-sided paragraph tags, even though the closing tag is optional in HTML?
Quiz Answers
- The tag indicates that the file is in the HTML language. The tag
specifies that the lines within the beginning and ending points of the tag are the
prologue to the rest of the file. The tag encloses the remainder of your
HTML page (text, links, pictures, and so on). - The
tag is used to indicate the title of a web page in a browser’s title bar
and bookmarks. It is also used by search engines. This tag always goes inside the tags.
- HTML supports six levels of headings. Their tags are <h1 .. /h1> through
<h6 .. /h6>. - The closing tag becomes important when using CSS to style your text.
Closing tags also are required for XHTML 1.0.