Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Inserting an image

From: Creating a CSS Style Guide: Hands-On Training

Video: Inserting an image

So let's start designing our page, inserting images, marking up our text, and then eventually we will start adding styles. I have given myself a text reminder that at the top of the page I would like to place a header image. Let's select those two words, and what I would like to show you are three ways in which we can insert images inside of Dreamweaver. Dreamweaver can do everything two or three ways and I won't show all the ways all the time, but in this case it's kind of fun to see how we can put images in and out of our document. If you would like to see all the ways you can accomplish tasks inside of Dreamweaver, see the Essential Training titles.

Inserting an image

So let's start designing our page, inserting images, marking up our text, and then eventually we will start adding styles. I have given myself a text reminder that at the top of the page I would like to place a header image. Let's select those two words, and what I would like to show you are three ways in which we can insert images inside of Dreamweaver. Dreamweaver can do everything two or three ways and I won't show all the ways all the time, but in this case it's kind of fun to see how we can put images in and out of our document. If you would like to see all the ways you can accomplish tasks inside of Dreamweaver, see the Essential Training titles.

Let's move down to the bottom right, to our Files panel, and you can see that we have several other tabs down here. Let's click on the Assets tab. You will see that there are a lot of different kinds of files that we can preview, but what we want to see right now are images. Whenever you see the Tree icon on a tool, that indicates that it has something to do with images inside of Dreamweaver. The Assets panel gives you a way to preview your images. If you have forgotten what they are, or you have been handed a folder of images and you are not sure what they are, this is a great way to get a little thumbnail preview.

Again, I can't emphasize the importance of naming something meaningful. I have given you three headers for this project. You can use any header that you want. I'm going to use header_cool.jpg. At the bottom of this panel you will see a button called Insert. Wherever your I-beam is currently in the document window, upon clicking this button, that's where the image will appear. So let's click on Insert. Of course, because we kept in our Preferences the Accessibility Attributes to be on, we are going to need to add an alternative text. Remember that people with visual impairment will have a screen reader, so it's important that they can hear what you and I see. So we are going to put a clear distinct title.

This would be Cool Company Logo. The long description is only used for simulations, movies, things that would be more difficult to describe, that take longer descriptions. For instance, if you are in a science class looking at a volcano movie, you might want to put a long description there. Let's click OK. So our image popped in. It looks good. But you can see that it did not delete the text header image. That was just a placeholder, just a prompt for me to remind me what I'm doing on this page. I'm going to select that and hit my Delete key.

So it's important while we are designing that we feel free and comfortable to put things in, try things out, change our minds. So let's go and click the header image and delete it. I would like to show you a second way we can insert images. Again, let's go back to our Files panel, select Files, and let's look inside our images folder. See the same list, but we don't get the thumbnail preview. I find the header_cool.jpg. If I click and drag on the icon, as I drag over the document window, wherever I drag, you can see the I-beam jumps. Now, this is a little more dangerous way to insert images, because if you are nervous or you are not sure where you are going to target the end result, you can insert it in the wrong place. Of course, you can always use Command+Z and Undo, but let's put this up at the very top and then let go.

Again, we will be reminded to add the alternative text. Just put the same thing I did last time and click OK. So that's a cool, fast, power-user way to insert an image. But the last way I would like to show you is the fun way, and one that lots of beginners and intermediate people use, I like to use it myself. Let's click on the image, Delete, leave the I-beam inserted at the top of your page, and let's go to our Common toolbar. Now, I told you we would use these tools all the time and we will. There is that Tree, indicating it has something to do with images. Click on the dropdown menu, choose Image. Because we have defined our site, it opens up into our main project folder, but it doesn't know where we have our images. So we need to indicate the first time when we are inserting an image where the image folder is.

Let's click on our image folder, find header_cool, and there it is. Again, this is a great way. A lot of people like this because you get the thumbnail and you also can see your folder structure and directory. Now that Dreamweaver knows where your images are, that they are located in the image folder, the next time you click on the Image icon, or Insert Image icon, it will take you to this folder. Keep this Relative to Document. Don't change that. Let me explain this Relative to Document. What you need to understand is we are not actually embedding an image into the document, we are linking an image to the document, and Relative to Document is all that it's saying that this is an image that needs to be linked to this HTML document. Let's click on the button Choose, type in our alternative text, click on the button OK. Great! That was fun.

Now, let's check out one other thing. With the header image selected, let's go down to the Properties Inspector at the bottom. I told you that every time we do something inside the document window that the Properties Inspector would contextually change. So there is a lot of information down here, and one of the ways that I have learned Dreamweaver is by looking at the Properties Inspector all the time when I'm working. It gives us our directory address, images/header_cool.jpg. It shows our Alternative tag, so if you need to change that or you don't have the right information there, you can just edit it right there on the fly.

One other thing you should do is keep looking at code. Don't be afraid. The way to learn code is to look a code. It's a little bit like learning a foreign language, if you don't try it, you don't learn it. So let's look at the Code View. Because we have the image selected in the document window, in Design View, the selection also shows up in the Code View, so that's a good thing. So we see that there is our image tag and we see that we have three or four attributes for our image. The first one is Source. Source indicates that it's a linked file, not an embedded file. I need to emphasize this again and again that the parts that you use on your web page are often linked to your main HTML file. So this shows that this is a linked file in the image folder.

When you insert an image in Design View, it also adds the two attributes for Width and Height. I should warn you that if you insert an image in Code View, it will not add Width and Height. So I recommend that beginners and intermediates use the Design View. The Alt is the Alternative attribute or the Alternative Text attribute, and there is our Cool Company Logo that would be read by a screen reader. Again, you can edit any of these things inside of the Code View as well, and if you go back to Design View, they will update.

There is one other problem, because I started with a text document and the word header image, Dreamweaver took it upon itself to think that the image tag should be wrapped in a p tag or a Paragraph tag. But we don't want to do that, because later down the line this will cause us all kinds of problems. When we style our image tag and our p tag, we want them to have separate styles. This is easy to fix. Just select the p tag, both carets, hit the Delete key. Then select the close tag, hit the Delete key, and click over on the Refresh button, on the right side.

So you had edited your first piece of code and nothing bad has happened. Let's click on the Design View. So back in Design View, it doesn't look any different than it did before, but if we select the image and look down at our Tag Inspector, we can see that the image tag is now properly nested inside of the body. It's not an image tag nested inside of a p tag; it's nested inside of a body tag. This is the way we want it to appear. So we have completed our task. We have got our image in where we want it to be.

We have our Alternative tag setup. It's important at this point to save our document. Command+S or Ctrl+S. Now our document is saved and we are ready to move on.

Show transcript

This video is part of

Image for Creating a CSS Style Guide: Hands-On Training
Creating a CSS Style Guide: Hands-On Training

35 video lessons · 28050 viewers

Laurie Burruss
Author

 
Expand all | Collapse all
  1. 6m 58s
    1. Welcome
      1m 9s
    2. Objective of this course
      3m 38s
    3. Using the exercise files
      2m 11s
  2. 28m 26s
    1. Starting Dreamweaver for the first time
      3m 38s
    2. Defining a website
      4m 3s
    3. Understanding the Dreamweaver interface
      9m 43s
    4. Setting up a custom workspace
      4m 10s
    5. Setting essential preferences
      6m 52s
  3. 56m 54s
    1. Laying out a page in a text document
      3m 40s
    2. Creating and saving a new document
      3m 27s
    3. Inserting an image
      8m 22s
    4. Marking up text using the Property Inspector
      6m 48s
    5. Marking up text by hand
      9m 21s
    6. Inserting, formatting, and selecting a table
      8m 16s
    7. Creating links
      12m 26s
    8. Styling a footer
      4m 34s
  4. 22m 15s
    1. Using Modify Page Properties to create embedded styles
      12m 22s
    2. Creating links with CSS
      4m 55s
    3. Working with Code, Split, and Design views
      4m 58s
  5. 8m 52s
    1. Defining browsers to test a web page
      2m 24s
    2. Previewing a web page in a browser
      6m 28s
  6. 16m 44s
    1. Using a span tag to add a class and customize appearance
      10m 34s
    2. Using the Tag Inspector to create and edit additional styles
      6m 10s
  7. 48m 42s
    1. Exporting existing styles into an external style sheet
      7m 0s
    2. Using the CSS Styles panel to add a new style
      5m 43s
    3. Using the div tag to create a content container
      11m 8s
    4. Overriding the default browser styles
      2m 46s
    5. Applying padding and margins
      4m 57s
    6. Styling header tags
      5m 34s
    7. Creating and styling compound tags
      5m 12s
    8. Editing preexisting rules
      6m 22s
  8. 19m 36s
    1. Improving the Footer
      5m 12s
    2. Commenting a CSS style sheet
      7m 0s
    3. Creating a custom color palette
      7m 24s
  9. 3m 6s
    1. Style sheet final review
      3m 6s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Creating a CSS Style Guide: Hands-On Training.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.