Join James Williamson for an in-depth discussion in this video Using the Quick Tag Editor, part of Dreamweaver CS6 Essential Training.
- View Offline
While the Properties Inspector and the Program menus give you many options when formatting text. There are times when those choices either won't be available to do what you need to do or when they're simply just not that efficient as a means of getting done what you need to get done. At that point, you have two options; you can either go into the code and modify it yourself, or you can use the Quick Tag Editor. In this movie, I want to take a look at what I call Dreamweaver's most overlooked feature and that is the Quick Tag Editor.
So I have the graphic-design.htm file open from the 04_06 directory. And as I sort of scroll around this document, even in this regular Design View, I can tell there are a few things that look a little off. For example, if I scroll down to Required Curriculum and I click inside the word Curriculum, I can see that it's italicized for whatever reason. It's not supposed to be. I notice if I look down here in the Tag selector that I have this little em tag, this little em tag, and I really don't want that.
So the Quick Tag Editor in the Tag selector, this little status bar down here, those two work together very, very closely. So one of the quickest and easiest ways for me to get rid of this particular tag is simply go down to the tag selector, I can right click the tag and I can tell it to remove the tag. It's going to strip that formatting out and it's just going to leave that text within the h2 which is kind of what I want. That was pretty easy to do, but if I look above this, I have got sort of a bigger challenge ahead of me. You will notice that there is a paragraph just above this headline, that's actually a quote from a former student. an alumni of Roux Academy.
And it's sitting inside of a paragraph which honestly isn't the most appropriate structural element for that quote. We actually have an element in HTML called blockquote which is much more appropriate at basically describing a quote or a citation from somebody. So what I want to do is I want to change that paragraph element to a blockquote tag. Now in the previous movies when we needed to change the structural formatting of our page, we have been able to click inside of an element and then just select this Format pull-down menu.
But you will notice that blockquote is not an option. I'm really very limited in terms of what this menu gives me and allows me to format. So again here I'm sort of left having to either go into the code or use the Quick Tag Editor. So, I want to show you how the Quick Tag Editor works. So I am just going to click anywhere inside of the paragraph. The quickest and easiest way to get it to come up is to use a keyboard shortcut. Now on the Mac, you'll hit Cmd+T and on the PC you are going to hit Ctrl+T. Now based on where you are focused, you are going to have very dramatic differences in what the Quick Tag Editor is going to allow you to do.
Let me show you what I mean. Notice that I don't have the paragraph highlighted, I just have clicked inside the paragraph. So if I hit Ctrl+T or Cmd+T, notice the Quick Tag Editor comes up. It allows me to start writing code, but notice that the option that it's giving me is to Insert HTML, so it thinks that I want to insert some code into the section of the page that I am currently focused on. That's not what I want to do, I want to modify the existing tag. So in order to do that, I have to change my focus. All right! So I am not going to do anything here, I am just going to click off of that. And now what I am going to do, I am going to go down to the tag selector and using the tag selector down here, I am going to select the paragraph that I am inside of.
You can see now it highlights that text. I want to be very clear about this and I am going to go over to Split screen view so you can see what I'm talking about and this is one of the reasons why I'm such an advocate of using the tag selector. There is a huge difference between highlighting text and selecting a tag. If I click inside this paragraph and I highlight the actual text itself, you can see in the code, I don't have the paragraph itself selected, I have the content inside the paragraph selected, it's big difference. If on the other hand, I click inside of this and I use the tag selector to select the Paragraph tag, now in addition to selecting the content, it actually selects the paragraph tag itself, okay.
So I am going to switch back into Design view. It's just really important for you to understand that difference. This and this are two very different things, even though they look the same visually. So now I have selected the paragraph with my tag selector and once again I am going to use keyboard shortcut the Ctrl+ or Cmd+T to bring up my tag selector. Now look what it's doing. It's saying okay, you want to edit this existing tag. So now it thinks because I have the paragraph selected, it's saying okay, you must want to edit this existing tag. I do. So I am going to remove the p, I am just going to hit Backspace and now I am going to start typing.
Now what's really cool about the tag selector is it gives you code hinting. So as I type a b and an l, notice it jumps down to blockquote, I don't have to type the whole thing out. Now all I have to do is hit Return to select that particular element, hit Enter one more time and now it switches the element itself from being a paragraph tag to being a blockquote tag. I know it seems like that took a while because I was talking about it as I did it, but one of the things that is amazing about the Quick Tag Editor and one, it's well named, is how fast it is. Let me show you this again.
This time I am going to show you in real-time. All right! So I am going to show you exactly kind of how I would work without actually describing this. I can click inside of tag, use the tag selector, hit Ctrl+T to bring this up, type in bl and I am done. And it's just that quick and easy, that's actually faster than we switching over to Code view, highlighting the opening and closing tags and changing them. It's an incredibly quick way of editing the actual code itself. So far we've seen that it can help us insert HTML. We've seen that it can help us modify existing HTML and it has another very nice use as well.
You can see that right now there's no sort of differential between the quote and the person making the quote. So what I am going to do is I am going to highlight her name and title which is right here. And once again with that text highlighted, I am going to hit Ctrl+ or Cmd+T again. Now I see that the Quick Tag Editor is actually giving me a third option. So instead of inserting HTML or modifying existing HTML, now it's saying, okay you have a section of content selected, you probably want to wrap that in a tag. Actually I do want to wrap it inside of a tag.
What I want to do is I want to wrap it inside of a span tag, so I am going to type in span. But this time instead of just hitting Return once, what I am going to do is after I'm done selecting span, I am going to hit Space and now I can begin to add attributes to the tags. So I am going to go ahead and do a class attribute and I am going to do a class attribute of quote. You can see how nice the code hinting tools inside Dreamweaver are. We are going to take a closer look at those when we do the chapter on coding, but what I love about that is so it's quick and easy, it's going to scan through my CSS, it's going to find all the available classes and it's going to say oh, do you want to do a quote? Yeah, I want to do a quote.
Now when I hit Enter or Return, it's going to go ahead and style that form me as well and if I look at that in Live view, I can see that now my blockquote is styled exactly the way I wanted to and there is a nice difference visually between the paragraph and the blockquote. And there is also that difference structurally that lets other user agents know that hey, this is a quote from somebody and not just a normal paragraph. You can also use this to make very minor edits to elements as well. If I look over here in the sidebar, I can see that my one sort of info bubble over here, info Links is very different from the other ones in terms of how the heading looks.
And if I click inside one of these, I can see that it's a section with two classes applied to it, it has connect and info applied to it. However, if I come over here to Academic Links and click inside that, I can see it's a section and it has a class applied to it, but it's missing the info class. So once again I can use the tag selector to select that section. I can hit Ctrl+ or Cmd+T to bring this up and you will notice that it takes me right inside the classes and I can just go ahead and hit Space and type in info to apply multiple classes to it and now if I save the file and preview it in Live view, I can see that this particular section is looking exactly the same as the other sections as well.
And that was a very fast and easy way to do it. Now even if you're like me and you are somebody that prefers just to kind of hand code your site yourself, you'll find that the Quick Tag Editor, if you start using it at a good bit, you'll find that it's actually in many cases faster than coding the change yourself. It's the one visual tool in Dreamweaver that I consistently use on whatever project I'm working with you know. Just as the name suggests, it's quick, it allows me full access to the code that I'm working with, it gives me the freedom to work with my pages' code while seeing the immediate results here in the visual side of things.
And if you adopt using it early on as you learn Dreamweaver, you'll find that it quickly becomes an invaluable part of your workflow.
- Choosing and customizing a workspace
- Defining a new site
- Uploading files to your site
- Creating new documents and web pages
- Formatting source code
- Working with CSS
- Placing images and background graphics
- Creating links
- Styling a basic table
- Creating a web form with buttons, check boxes, and list menus
- Adding Spry effects