Review
- Tags that should appear in every page (one of each, in this order): <html><head</head><body></body></html>
- Tags are not case sensitive in HTML ( can be upper case, lower case, or mixed
case) but are must be lower case in XHTML
- Tag syntax:
<tag attribute1="value1" attribute2="value2">Some content</tag> Some
tags don't have attributes; the closing tag looks the same as the
opening
tag except it begins with a /. The closing tag does not include
any attribute=value pairs. In HTML, attribute values must be quoted if more than one word, in XHTML, attribute values must be quoted.
- in HTML, most tags have a closing tag because one needs to specify when the formatting
effect of the tag ends; in XHTML, tags without a closing tag will end with a /> rather than a >
- Heading tags (<h1> through <h6>) render the text bold, on its own line;
among the heading tags, h1 produces the largest text, with h6 the smallest
- When a browser displays an html file, it ignores any carriage returns
in the document, so if one wants to force the browser to the next line,
one uses a <br /> tag (stands for break) or a <p> tag (stands for paragraph).
A <p> results in a blank line.
- When a browser displays an html file, it ignores any extra spaces in
the document, so if wants to force the browser to display a space,
one types (stands for non-breaking space; these can be repeated).
- Bulleted lists:<ul><li>list item</li> followed
by more <li> for additional items or use <ol> instead of <ul> for
numbered lists. The type attribute can be used to control what type of
bullet point is displayed or what numbering is used.
- <title>Bill</title> tag in head section of the document will result in
the title Bill being displayed in title bar of browser, the title being
the default bookmark or favorite for the page, and what a search engine
will
display
as a link
- Logical tags such as <em>, <strong>, <cite> vs. physical tags such as
<b>, <i>, <u>
- Comments in the html file use the following syntax: <!-- Text of comment
here --> The comment can be a single-line or multiple line comment
- Web pages ordinarily are saved with either an .htm or .html extension.
They then can be displayed in the browser by opening the browser, selecting
File>Open and then browsing to the html file. Alternatively, one can
double-click the html file in Windows Explorer or My Computer, and the
associated application (normally the default browser such as Internet
Explorer or Firefox) will be launced and the file double-clicked will
be displayed
by the browser.
- If you make changes in the html file, 2 steps are necessary before you
will see the change in the browser -- save the file and refresh/reload
the page in the browser
- Once a page is displayed in the browser, one can see the source code
displayed in Notepad by selecting View>Source in Internet Explorer or
a similar command in Firefox
- In XHTML, tags must be properly nested; for example <b><i>Hello</i></b> rather
than <b><i>Hello</b></i>.
Revised: April 20, 2010. Comments to William Pegram, bill@billpegram.com