Please subscribe to watch this video
In this video we're going to put Tags inside other Tags and introduce you to this DOM panel. Let's go and do that now.
So the first thing we need to do is, we're going to put in our Header Tag. Now, over here, under 'Insert', in 'HTML', your website's going to have three major chunks to it. It's going to have a Header, a Main Section, and a Footer. So the top, middle, and bottom. The Header and Footer are generally going to be the same on every page. We'll turn that into a Template later on. And the Main is where everything's going to change for your actual page.
So we'll put the Logo in first, which is kind of bit weird. You probably put your Header in first, and then the Logo inside of it. I've done it because I want to be able to show you how to re-order Tags if you get it in the wrong place. So what we're going to do-- it doesn't really matter where you clicked over here in the Live view, click on the 'Insert', 'HTML', click on the 'Header'. And it will appear somewhere, doesn't really matter if it's below or above the Logo here.
Now what Dreamweaver does as well is that it adds some pre-existing Text here. Just place holder Text, because if this Text does not appear here-- you can't actually see it, because it has no height, no width, no dimensions. The Header kind of goes in, and you can't see it, so it's a bit dumb. So that adds some Text in here to be helpful. This Text gets deleted pretty much straightaway once you've started using it.
First thing I want to do is, I want to put my Logo inside of my Header. You can kind of see down here in my Code view, there's my Header. Beginning and ending. Here is the Logo with the Hyperlinks and you can see the Alt Text, and the size of it. This thing I would like to go inside Header. There's kind of two main ways of doing it, it's actually a few. It's up to you whether you prefer sticking to the tools or you like working in Code view, it's totally up to you. Let's use the official way that Adobe recommends.
I work in my DOM panel here. If you can't see it, it's under 'Window', 'DOM'. And here is the Head of my site. That's all the stuff that the computer sees. You can see, here's my Title in here, tells me what kind of keyboard I'm using, but the user doesn't see any of that Head. It's easier to stuff it in the Body. So the Body contains my Header, contains my Image. And that's about it at the moment.
So over here, in my DOM panel, you can see, there's my Body. I'll twirl this down. There's my Header, separate from my a-tag which is this Link with my Image in it. You can just click and drag the 'a' inside the Header and it goes inside, and they become one happy family. Then I can go through and delete this Text, place holder Text. You can do it from up here. Actually we'll stick to doing it here in Live view. Click off. And now, that's it, we've got a Header that has my Image inside of it, with my a-tag.
That is how to kind of-- if you get things in the wrong place you're going to either have to drag them in the DOM, just drag them into the right Tag, or do what I tend to do, is I'm going to undo all of that. Here's my Header Text, I'm going to delete the Text here. Grab all of that, so, from a-tag to a-tag, cut it. Put my cursor in there, and paste it. It doesn't really matter how you like doing it. Dragging it by the DOM, or just copying and pasting down here. Just lots of times where it's easier to do one, and the other. So I'm giving you both techniques, so you can work through this course.
All right, let's hit Save, 'File', 'Save'. Let's move on to start styling our Header.