HTML and CSS Reference
In-Depth Information
he code in Example 1.1 (shown in boldface) consists of two parts: a docu-
ment body containing the page's content, preceded by a head section that
contains information about the document. In this example, the head section
contains the document's title and a CSS style rule to center the page's head-
ing. he body consists of a level 1 heading followed by a paragraph. he result
should look something like Figure 1.1.
Figure 1.1: A simple web page
his brings up a fundamental principle about how the Web works: Web
authors should not make assumptions about their readers, the characteris-
tics of their display devices, or their formatting preferences. his is especially
important with mobile Web users and people with visual disabilities. A Web
author or developer shouldn't even assume that a site visitor is human! Web-
sites are constantly visited by automated programs that gather and catalog
information about the Web. he general term user agent is used to describe
any sotware application or program that can talk to a web server. A modern
website regards visits from all user agents with the same importance as human
visitors using Web browsers. he best approach is to keep the HTML simple
so that it provides a semantic description of the various content elements and
leaves the presentation details to the reader.
he other major player on the Web programming team is JavaScript , a pro-
gramming language that runs inside a browser and manipulates HTML page
elements in response to user actions and other events. here are other script-
ing languages besides JavaScript, but it is the most popular. Also, JavaScript
syntax and terms are used in the HTML5 speciication. Like CSS, JavaScript
code can be embedded within the HTML source code of a web page or can
be imported from a separate ile. User agents other than browsers generally
ignore JavaScript and other embedded executable code. It can be dangerous
for robots.
Robots?!
 
Search WWH ::




Custom Search