Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > Adobe Dreamweaver

This chapter is from the book

This chapter is from the book

Paragraphs, Headings, and Lists

Let's begin by dealing with our basic typography styling. Looking at the page with the overall serif font is making our eyes burn! If you need to check your work, or simply want to start in this section, you can use the index_1.html file in the builds directory.

Sometimes, it helps to size and visualize the headings if we change the text to match the comp.

  1. Change the text in the <h1> in the mainContent div to say "Visiting the Area." Change the text in the <h3> in sidebar2 to say "Area Highlights."

    Because sidebar1 will contain our navigation, we won't worry about that heading for now.

    Since our designer gave all the headings a normal weight and orange color, we can create a font-weight selector for the entire group of headings. The sizing will have to be changed separately.

  2. Place your cursor into one of the headings. On the CSS area of the Property inspector, choose Targeted Rule <New CSS Rule>. Click Edit Rule. (Or create a new CSS rule by clicking the New CSS Rule icon at the bottom of the CSS Styles panel.)

    The New CSS Rule dialog appears auto-filled with the path to your element.

  3. Choose Compound Selector Type. In the Selector Name input, type in h1, h2, h3, h4 and click OK.

    This will create a grouped selector where we can place the color and weight.

  4. In the Type Category, choose #FF9F00 for the color and set the font-weight to normal. Click OK.

    h1, h2, h3, h4 {
     color: #FF9F00;
     font-weight: normal;

We'll similarly define the font-family and line-height for the paragraphs in our page as well as the lists in the main content area. We're keeping the lists in the main content area separate because our horizontal and vertical menus will be lists as well and we want these properties to be specific and not cascade to the menus.

  1. Open the New CSS Rule dialog. Choose Compound selector and type in the grouped selector, p, #mainContent ul, #mainContent ol. In the Type Category, set the font-family to the font group starting with Arial. Set the line-height to 1.5 and select multiple from the list. Click OK.

    This gives us a nice sans-serif font with a bit more breathing room for p elements anywhere in the document and list items in the main content area only.

    Figure 4.8

    Figure 4.8 Comparing our headings to the comp.

We'll turn our attention the header sizing now. Comparing our comp to our page, we see the h1 in the main content area and h3 in the sidebar are smaller than the designer envisioned. We'll adjust those now by creating simple element selectors for h1-h4 level headings.

  1. Place your cursor into the h1 element in the mainContent div. On the CSS area of the Property inspector, you'll see the grouped selector you made for the headings showing in the Targeted Rule select. Change that to <New CSS Rule>. In the Size input you'll see 80%. Type 225% into the text field and press Enter.

    The New CSS Rule dialog will open showing the full path to the element—#container #mainContent h1 in the Selector Name input. We don't really need to be that specific here.

  2. Click Less Specific twice so that only h1 is showing. Click OK.

    A new rule is created for the h1 element with the larger font-size.

  3. Repeat the process for the h2 and h3 selectors. Give the h2 a font-size of 175% and the h3 a font-size of 150%.

    Since there is no h4 element in the page, you will have to create that one using the CSS Styles panel or directly in the CSS document using the Related Files toolbar.

  4. Create a rule for the h4 and give it a font-size of 135%.

    Your new rules should be at the bottom of your CSS document and look like this:

    h1 {
     font-size: 225%;
    h2 {
     font-size: 175%;
    h3 {
     font-size: 150%;
    h4 {
     font-size: 135%;

Resetting and Styling the Lists

Lists, left to their defaults, show a good deal of difference in styling from browser to browser. You may have found their spacing odd and hard to control. This is because some browsers use padding and others use margin to indent the list. The easiest way to level the playing field is to create an element selector that zeros the list defaults. Then, place the margin or padding values we need for various lists, including menus.

In the comp at the middle bottom of the mainContent area, there are two links styled with the same little triangle indicator graphic as we see on the vertical navigation. In times like these, we need to find out what our graphic designer had in mind. Does she want a specific link style? Or is she indicating that all the unordered lists should have this indicator instead of a regular bullet? After discussion, we found that all unordered lists should be styled with the graphic instead of a bullet.

This means we're safe to remove the bullet from all lists in our site since the menus won't need bullets either. Let's place an unordered list into the middle of the main content area of our page.

  1. Place your cursor about halfway through the text below the h2 level heading. Hit Enter twice to break the paragraph as well as create a new one. Arrow up into the empty space. Type some text.

    If you're looking at Source Code in Code and Design view, you'll see you're in a paragraph.

  2. On the HTML area of the Property inspector, choose the Unordered List icon (top row, first of the four at the right).

    Figure 4.9

    Figure 4.9 The Unordered List icon in the HTML area of the Property inspector.

    You'll see an indentation and bullet appear in front of your text.

  3. Hit Enter and create two more list items. Make one or two of them links as well.

    Many times, especially when dealing with legacy code, designers create something that appears to be a list with a fancy bullet by using a two-column table. They place the bullet image in the left column, the text in the right column, and each so-called list item is in its own row. We created a demo that contrasts this common technique with the proper, semantic method that you should be using. You'll find it in the listDemo folder in your source files for this chapter.

    Let's build a properly formatted list with decorative bullets. First, we'll create a selector that will zero the list defaults sitewide.

  4. Create a new CSS Rule for the ul element. (You know how to do this by now!) In the Box Category, give it a 0 margin and 0 padding value. In the List Category, choose none in the List style type selector.

    We notice the list is now even with the edge of the paragraph on the left. There is no indentation at all. There are also no list markers. Viewing the CSS in the Related files toolbar, we see:

    ul {
     margin: 0;
     padding: 0;
     list-style: none;

    Now it's simply a matter of adding the list graphic.

Creating a Background Image from Photoshop

Obviously, we could create the arrow graphic as we have been doing—simply slice this image in an image editor and export it. But we're going to do something slightly different this time. (If you don't have access to Photoshop, please export the badge from the graphics editor of your choice or use the arrow.gif in the images directory.) In fact, this is a technique you can use to import background images from Photoshop into Dreamweaver—and take advantage of Fireworks' capability to create smaller file sizes.

  1. Open the design in Photoshop, and Alt+click on the arrow on the left menu.

    This will find the layer for you in Photoshop.

  2. Select Layer > New Layer Based Slice from the Photoshop menu.

    Photoshop creates a slice directly over the tiny arrow icon.

  3. Choose Edit > Copy from the Photoshop menu.

    If you've somehow deselected your slice, choose the Slice Select Tool from the Tools bar and click onto the slice just created before copying.

  4. In Dreamweaver, place the cursor anywhere in the page. Choose Edit > Paste.

    Dreamweaver recognizes that the content on the clipboard is not text but an image, and opens the built-in Fireworks optimization dialog. We can now set the optimization level for the image.

  5. Choose to optimize the image as a gif and click OK. Name the image arrow.gif and save it into the images folder of the site.
  6. The Image Description (Alt text) accessibilty dialog will open. This is one of the rare instances where we don't need to type anything inside. Click OK.

  7. Delete the image from the page.

    The image is now available to us in the images directory, we didn't have to zoom in close to slice it properly and we got the added advantage of a smaller file using headless Fireworks. Groovy!

Adding the Graphic to the List

Now that we have the arrow imported, there are two ways we can use it as a list marker. The first, you can experiment with on your own. Yes, you can place a graphic as a list marker using CSS and the list-style-image property. The problem is, you have no control over placement with that method. Instead, we'll use a much more reliable way—using the background image property and a little padding to keep the text away from the image.

  1. Create a new CSS rule called #mainContent li.

    By now, you should know this has to be a compound selector.

  2. In the Background category, Background image, navigate to the arrow.gif in the images directory. Set the Background repeat to no-repeat and choose left for Background position (X) and center for Background position (Y). Click Apply.

    We've positioned the background image so it will remain nicely centered on the text vertically. However, if we had lists that might have several lines of text, this could look awkward. In that case, we might want to set it to the top, or a couple pixels from the top (to get the proper alignment with the image we're using). Viewing the page, we can see we have a graphic there, but our text is overlapping it!

  3. In the Box category, set the left padding to 15px. Click OK.

    Don't be alarmed at the odd coloring. We'll attend to that in a bit. For now, we can see that the placement of our image is working just swell.

    #mainContent li {
     background: url(images/arrow.gif) no-repeat left center;
     padding-left: 15px;
Figure 4.10

Figure 4.10 The Unordered List icon in the HTML area of the Property inspector.

Just a Quick Sweep!

Though it's fine to leave the rules at the bottom of the page, or to move them at the end of the build, we're kinda weird about staying organized (lest we lose control in a large style sheet). This would be a great time to switch your CSS Styles panel into All mode and move things around a bit. We're using our preferred method (discussed earlier).

  1. Ctrl-click all element selectors and drag them up so they begin directly after the body element. We included the an img rule as well as the grouped selector that includes the p element in the rules we moved.
  2. Move the mainContent and header descendant selectors under their respective divs.

The index_2.html file in the builds directory will allow you to check your work before moving to the next section.

Figure 4.11

Figure 4.11 The rules in their original state and in their organized state.

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive:

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020