HTML and CSS Reference
In-Depth Information
solar system's size. If printed, the page would have consumed a few thou-
sand sheets of paper! A student today might do a similar project based on the
HTML5 canvas element. Imagine swiping your way around the solar system
on an iPad or other touch-sensitive computer.
A web page is more than what appears on its surface. It has three-
dimensional aspects. Content can be hidden and made to appear using script-
ing elements and can be layered using CSS positioning. Best of all, a web page
can be an interactive platform for deploying widgets and other funĀ things.
As soon as the basic ile structure of a new website is in place, the next step
is deciding what should stay the same on every page and what will change. If
the website will have diferent types of pages, you must ask the same question
of each page type. A more commonly structured web page with header, footer,
and sidebars can have much of that page content coded once and included in
each page as it is built.
here are two ways to include common content and markup in web pages:
using an oline development environment and using server-side includes.
A good development environment uses an HTML editing application with
macro functions and deined templates. Pages are edited on a local com-
puter, and authors insert special include tags or commands into the page.
hese are illed in by the editing program when it publishes the page to the
website. Server-side includes are a means of instructing the web server, using
commands embedded in the ile in the form of special HTML comments, to
include other material in the web page before sending it back to the requesting
browser. For example:
<div id="logo-head">
<!--#include file="logohead.html"-->
he advantage of server-side includes is that if a change is required in one of
the common elements, such as adding a new item to the main menu, only the
one include ile has to be changed. With a client-side development approach,
all pages using that template must be republished to the site. However, prepro-
cessing iles containing server-side includes uses extra resources on the server.
herefore, many web hosting companies enable this feature only for iles that
have the special extension .shtml. he use of server-side includes is not as
common today as it once was because of the popularity of PHP applications
Search WWH ::

Custom Search