Create a Web Site using Dreamweaver

 

This lab introduces Dreamweaver as a web editor. We'll use Dreamweaver to create and format a web site about volcanoes. Dreamweaver generates both HTML and CSS code. Additional information is available from Wellesley College Information Services: Dreamweaver Documentation

Setting up your file structure

We will create a site about volcanoes during today's lab, and it will have the following structure:


Structure of the Volcanoes web site

Use Dreamweaver to produce HTML Code

Please notice that the instructions on this page are not very detailed, and they don't intend to substitute for the official Dreamweaver documentation. Instead, they are intended to be used as reminders on how things are done. For exact step-by-step instruction, please use the on-line Dreamweaver documentation, which is user-friendly and absolutely great! Before we continue with css code, add a few <H2> tags to each of the html documents in your Volcanoes site.

Use Dreamweaver to produce CSS Code

1: External Style-Sheets

A: Create a new External Style Sheet and a new Rule

First of all, you need to decide on the characteristics that are common to all (or many) of the pages in your site. It is best to include the rules effecting those elements in your external style sheet. In the Volcanoes site, we want all the H2 headers to appear pink and underlined.
Here are the steps to create a new external style sheet and a new css rule:

The H2 Headers in your HTML document should be effected by this rule now! They should be in pink, and underlined. Make sure you study the produced CSS code, in the my_style.css document! Does it seem familiar?

B: Link an html document to an external css document

Often times you want to link an HTML document to an external style sheet. You know already that this is done by adding the LINK tag in the HEAD of the HTML document. Let's link the "usa.html" document to the "my_style.css" document we just created.
Here is how this can be done within Dreamweaver: Repeat the steps above to attach the same external style sheet (my_style.css) to the other html documents in the Volcanoes site.

C: Add a new Rule to an existing external style sheet

This time we want to modify the appearance of some of your P tags in more than one HTML documents. It makes sense to create a new rule, in the external style sheet, that defines a class of Paragraphs with the characteristics you want.
As an example, let's make some paragraphs have a bright colored background and name our class ".highlightP".
Here is how you can do it in Dreamweaver: The last step would be to specify the paragraph(s) we wish to belong to the ".highlightP" class. To do so, select the specific paragraph in the HTML document, and in the property inspector, choose ".highlightP" from the drop-down Style menu.

2: Document-Level Rules

Open your index.html document in the Volcanoes site, in Dreamweaver. We will try to use the application to produce a document-level CSS rule, to customize the EM tags in that document.
Open the Rule editor:
View your html document (index.html) in a browser, and look at the text modified by the EM tags. Did it work? Make sure you study the produced CSS code, responsible for this change. You will find this code in the HEAD part of the index.html!

Notice that, in addition to using Dreamweaver to create new html and css documents, you can also use it to edit/modify existing such documents!