HTML and CSS Reference
In-Depth Information
You can use either HTML5's structural elements or HTML 4.01's div elements to
identify the major sections of your document. The HTML5 approach is preferred because
it represents the future standard of the Web, and structural elements are more descriptive
than the generic div element. One problem with the div element is that there are no
rules for id names. One Web designer might identify the page heading with the id name
header while another designer might use heading or top . This makes it harder for Web
search engines to identify the main topics of interest in each Web page.
Written Communication: Writing Effective HTML Code
Part of writing good HTML code is being aware of the requirements of various browsers
and devices, as well as understanding the different versions of the language. Here are a few
guidelines for writing good HTML code:
Become well versed in the history of HTML and the various versions of HTML and XHTML.
Unlike other languages, HTML's history does impact how you write your code.
Know your market . Do you have to support older browsers, or have your clients standard-
ized on one particular browser or browser version? Will your Web pages be viewed on a
single device such as a computer, or do you have to support a variety of devices?
Test your code on several different browsers and browser versions. Don't assume that if
your page works in one browser it will work in other browsers, or even in earlier versions
of the same browser. Also check on the speed of the connection. A large file that per-
forms well with a high-speed connection might be unusable with a dial-up connection.
Read the documentation on the different versions of HTML and XHTML at the W3C Web
site and keep up to date with the latest developments in the language.
In general, any HTML code that you write should be compatible with the current versions
of the following browsers: Internet Explorer (Windows), Firefox (Windows and Macintosh),
Safari (Windows and Macintosh), Chrome (Windows and Macintosh), and Opera (Windows
and Macintosh). In addition, you should also view your pages on a variety of devices includ-
ing laptops, mobile phones, and tablets. To effectively communicate with customers and
users, you need to make sure your Web site is always readable.
At this point, you've created the basic framework of Dave's Web page. In the next ses-
sion, you'll insert the page content and learn how to apply a visual style to that content
to create a nicely formatted Web page. If you want to take a break before starting the
next session, you can close any open fi les or applications.
Search WWH ::




Custom Search