HTML and CSS Reference
In-Depth Information
where <p> is the start or opening tag, </p> is the end or closing tag, and the content
is situated between those tags. Table 1-2 shows examples of some HTML elements.
Table 1-2 HTML Elements
Code and Content
Indicates title to appear on the title bar in the browser
<title>This is the title text.</title>
Creates a link to a Web page named default.html
<a href=”default.html”>This is text
for a link.</a>
Line break
Inserts a line break before the next element (without a
blank line); there is no content or closing tag; use space-/
as closing tag
<br />
HTML Elements
Numerous sources of
information about HTML
elements are available.
The World Wide Web
Consortium (
provides the most
comprehensive list of tags
and attributes together
with examples of their
use. One of the main goals
of the W3C is to help
those building Web sites
understand and utilize
standards that make the
Web accessible to all.
Useful HTML Practices
When creating an HTML file, it is good coding practice to separate sections of the
HTML code with spaces and by using the Tab key. Adding space between sections, either
with blank lines or by tabbing, gives you an immediate view of the sections of code that
relate to one another and helps you view the HTML elements in your document more
clearly. HTML browsers ignore spaces that exist between the tags in your HTML docu-
ment, so the spaces and indentations inserted within the code will not appear on the Web
page. Figure 1-9 shows an example of an HTML file with code sections separated by
blank lines and code section indentations. Another developer looking at this code can see
immediately where the specific sections are located in the code.
blank lines will
not be displayed
in browser
code to insert table
with two rows
bullet list of
Figure 1-9 Adding spaces to HTML code separates sections to make reading easier.
Search WWH ::

Custom Search