Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
Discover how to build web sites, prototypes, and more in this course on Adobe Dreamweaver CS6. Author James Williamson shows designers how to take control of their site by properly naming and structuring files and folders; how to create new documents and web pages from scratch or with starter pages; and how to add content such as text, images, tables, and links. James also provides a background on the languages that power projects built in Dreamweaver—HTML and CSS—and introduces the programming features in the application, for developers who want to dig right into the code. The last chapter shows how to finesse your project with interactive content such as CSS3 transitions and Spry widgets.
Just like any other task you'll perform in Dreamweaver, you'll have your own personal preferences in terms of how you like to write and edit your code. Thankfully, Dreamweaver has a multitude of preferences that you can set to make sure that your code is created exactly the way you want. So to take a look at those preferences we are going to go up to our Dreamweaver Preferences which again, on the PC you'll find under Edit>Preferences, on the Mac you'll find it under Dreamweaver> Preferences, and we are going to start by looking at the Code Coloring category over here on the left-hand side. Now when I select that, I can see that I have some basic coloring scheme options, like default background.
So for example I could change that to black and when I click OK, I notice that now my coding window is black. So if you have a specific color coding scheme that you're used to working with in maybe a different code editor, you can go ahead and mimic that by changing those preferences. Now I want to bring those back up again and I want to point out something that is really important here. You'll notice that there is no button for me to click on to go back to the default. So if you change those and you sort of forget you know like, oh I didn't mean to do that, to go back, you are just going to have to remember or you going to have to throw your Preferences away and start all over again which is hardly fun.
So be very careful, you might want to even write those down the first couple of times you edit that. Now, in addition to sort of these default options that we have here for just the coding window itself, we also have the ability to edit the Coloring Scheme of any specific type of document. In this case of course we are focusing on HTML. If I click the Edit Coloring Scheme, you can see that I have all sorts of different options. If you know what I am going to do, hang on just one second here. I need to click OK again to set that back to white and I'll bring my Preferences back up. That way when we look at the Coloring Scheme, we are seeing an accurate preview of the way our code is going to look.
So, right down here in the Preview section, if I scroll through this, I can see all of the different elements of an HTML file and sort of how they're going to be coded in terms of their color. Now you might say to yourself, well yeah, that's not a big deal. What does it matter? It really does matter. Let me show you what I mean. So if you want to change a color of a specific element or attribute, one way to do that is to look for the Styles for list and find it, but if you're new to HTML or maybe you don't know what exactly something is called, you can simply click inside the Preview and it will jump to that value.
So this for example is an HTML attribute value and currently the color for those guys is blue. Well, I can change that color if I want to, but I need to be very, very careful about that and let me show you why. Again, I am just going to click OK, I am not going to change it and click OK again. The Code Coloring in Dreamweaver really does matter. Let's say that I'm working on my code and I forget to close one of the quotation marks for this particular attribute. As soon as I hit Backspace here to get rid of it, watch what happens to the code that comes after it. So what's happening is, all this code after it is seen as still belonging to this particular attribute, and it's going to keep going until it runs into another quotation mark.
That is a syntax error and through the use of Code Coloring, I can pick up on that and find that really easily. And sometimes it's a little bit more noticeable than others. Notice if I do here for example, that entire section of code now turns into blue. So that's sort of a visual clue to me, oh something is wrong with this code. Then I could scroll back up, see when my code sort of returns back to its normal Code Coloring and say, oh okay, well it's probably something to do with an attribute because it's using the color blue. So once you're used to the Code Coloring inside Dreamweaver, you'll sort of instantly pick up on what's wrong with your code and where it's wrong.
So pay close attention to the Code Coloring that Dreamweaver does for the code, and only change it if you have a very specific reason for doing that. All right! I am going to go back up to my Preferences and I am going to click on Code Formatting. Now I am not going to go through every single option here, if you want to kind of play around with this, feel free. But essentially, what this does is it handles how the code is formatted within the window, the type of indentations that you are using, whether you are using uppercase or lowercase letters for your tags and attributes, all sorts of things like that. We also have Advanced Formatting options for things like CSS, where you can go ahead and format your CSS code.
Now we are going to take a closer look at these options towards the end of this chapter. We also have a wonderful feature called Code Hinting. When you're writing code inside Dreamweaver, Dreamweaver can help you complete your code by offering you a hint, what it thinks you want to do. Whether you are applying a class attribute or finishing an h1 tag, doesn't really matter, Code Hinting will come up and allow you to rapidly complete that. Again you can change some of the preferences here, but the default preferences are basically to turn all the stuff on and enable it. So there's no real reason to change these preferences again unless you really want to. Now there is another cool little thing that's sort of hidden here that I want to show you guys before I move on.
If you notice right down here I've got a little link to what's called the Tag library editor. All the code hinting hints that we get, come from this library. And if I open this up, you can see that I get this nice little panel here with all the available HTML tags. Now this is actually a pretty good reference and a pretty good learning tool. For example I could open up the anchor tag here and I could see all of the different attributes that are available to me and there are parts of the specification for the anchor tag. Certainly the specifications are undergoing a lot of changes right now. What if HTML5 adds a tag? Well, all of a sudden, Dreamweaver no longer supports that specific tag.
So what if for example the group that's editing the HTML5 specification right now came up with a speech tag? Well, all I would need to do is go right up here to Tags, click on this and tell it that I want to create a New Tag. And when I create this new tag, I can come in and say okay I am going to place this in the HTML library, I am going to call it the speech tag and I want to make sure that it has an opening and closing tag. Now as soon as I do that, you'll notice that it adds it right here to the Tag Library. I can even go up and add Attributes to that particular tag if I want to. So I could do you know voice or something like that and now inside that tag, I've got those attributes.
So that's really cool. You can create your own Tag Library based on that and Dreamweaver will offer coding support for that particular tag and enable hints for that tag as well. Now if you're really a power user, you can also import what's known as a Document Type Definition Schema, DTTSchema. For example if you have a custom XML library, you can import that and Dreamweaver will go ahead and pick all the objects out of that and enable Code Hinting for your custom library. It's an amazingly powerful feature that few people take advantage of. So I just wanted to let you guys know that that is available in part of Dreamweaver.
All right! The final thing I am going to show you guys before we move on is the Code Rewriting preference. Now, again this is not something that you are going to see at all when you're actually authoring the code yourself. What you see here is the rules that Dreamweaver is going to follow when it's copying and pasting code say from another application, or the visual tools that you are going to be using in the Design view that place objects on the page. This controls how the underlying code behind those are written. So if you're not happy with the way Dreamweaver is creating your code, if you say want to fix any invalidly nested tags, or if you want to make sure that your special characters are encoded, you can go ahead and do that right here by setting those preferences.
Okay, I am just going to click OK, I know I didn't really change any of my Preferences, but to be honest with you, the default position of the Preferences in Dreamweaver are actually pretty good. But Dreamweaver does have a ton of Preferences that can control how your code is written and displayed and changing those Preferences can allow you to work exactly how you like to work and in the long run, that's going to make you more productive.
There are currently no FAQs about Dreamweaver CS6 Essential Training.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
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.