Much of the difficulty in using a program like Dreamweaver comes from understanding how the program breaks down the project into logical units. This page describes the “philosophy” of Dreamweaver and how to problem-solve in its mindset.
Sites vs. Pages vs. Layers vs. Paragraph Blocks
Dreamweaver breaks down your content into several logical “building blocks” — units that group common things together. You are already using the biggest logical unit — the Site.
A Site houses one or more Pages. These pages house one more Layers which in turn house one or more Paragraph Blocks. The Paragraph Blocks then contain the actual content: the actual text and images.
The following schematic shows how these different entities are related:
Pages vs. Files
When you navigate to http://google.com/, for example, what is it showing you? Surely the code and images that make up the Google home page must be in some files somewhere, right?
In fact, what you are being shown is a file called index.html on the google.com server. Try it out — go to http://google.com/index.html and see that what it shows you is in fact the same.
There are two things to take away from this example:
Pages on Web Sites are just files
All the pages on web sites are in fact simply files. In the same way that word processors typically create .doc files, Dreamweaver creates .html files for your Pages.
(Some sites do not have a separate file for every page as in the case where the contents are dynamic, but that needn’t concern us at this point.)
index.html is assumed
When you ask for http://google.com/, you’re not requesting any particular file: you’re requesting a folder, namely /. If we had been requesting a file (and not a folder), then the address would be something like http://google.com/index.html.
(Remember that slashes in a URL indicate folders in the same way that they indicate folders on your computer.)
More on index.html
Recall that if you have a folder of Word documents on your desktop, the folder itself doesn’t have the text of your term paper as its contents. Rather, the text of your paper is actually the content of a file within the folder.
So when you go to an address ending with a /, why do we see text and images instead of a list of files? The answer is subtle but important:
If the web server receives a request for a folder instead of a file, it assumes that the requester wanted a file in that folder called *index.html*.
So what if there is no index.html file in a folder? In this case, the web server does what your computer does — it gives a listing of all the files in that folder!
If you don’t want visitors to be able to see a listing of all the files in one of your site’s folders, you should put an *index.html* file in that folder. This file can be blank, but it must be there to prevent the server from listing all the files in the directory.
So there is this special file called “index.html” inside most of the folders on web sites. This file might better be called home_page.html or landing_page.html as those names more accurately describe what contents typically reside in an index.html file, but the name is special and means something to the server.
Next we’ll talk about the Dreamweaver interface and how to get comfortable with its many tools and dialogue boxes.