New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

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

Creating an HTML5 layout

From: Creating a First Web Site with Dreamweaver CS6

Video: Creating an HTML5 layout

Before diving into all of the HTML code, quite frankly, Dreamweaver writes most of it for us. We need to understand what's being written sort of behind-the-scenes and enable us to write some of it if we want to as well. Well, it's all written with HTML, which happens to be a language for describing web pages, luckily, it's consists of really just plain text, and that text is surrounded by markup tags in angle brackets, as you can see here, the title of the page is called My web Page. Luckily, there are plenty of different HTML tags available, going beyond title we have section headings that we can implement one through six.

Creating an HTML5 layout

Before diving into all of the HTML code, quite frankly, Dreamweaver writes most of it for us. We need to understand what's being written sort of behind-the-scenes and enable us to write some of it if we want to as well. Well, it's all written with HTML, which happens to be a language for describing web pages, luckily, it's consists of really just plain text, and that text is surrounded by markup tags in angle brackets, as you can see here, the title of the page is called My web Page. Luckily, there are plenty of different HTML tags available, going beyond title we have section headings that we can implement one through six.

We have paragraph text, so any time you've a lot of content, often times its paragraph text. Even within that paragraph text, you might have some text that has a link, and that's your h and a ref, which will link to something. You also have your image source in case you wanted to insert an image, so these are just common tags you may or may not be aware of. Going on from that we also have HTML5 tags. HTML5 tags are great, I love them because they're just a lot more descriptive.

And instead of having some generic divs with some IDs associated with them, you can actually just have some tags that say header, nav, section, footer, video, audio. Well, hey, I know what most that means and so do browsers. So it makes it really efficient, easy for me to develop HTML pages and the browsers can read them fine as well. All of those HTML tags are usually on an HTML document that's really just structured into three parts, you have up at the top the HTML version the document conforms to, so if it just says HTML, it means HTML5.

Then there is the head tag and between those two head tags exist all of the, mostly non-visual contents, you might have some JavaScript in there, some links to some CSS pages, which are cascading style sheet pages, things like that. But really most of the content you are going to be working with is going to be between the two body tags, the visual content, anything visual will be between those two tags. And all of those tags can be styled using cascading style sheets, which consist of selectors and declarations.

So here we have that paragraph tag, here's the CSS associated with that paragraph tag. Notice how it does contain a selector and declarations as well, so it might initially look something like this, but with the CSS applied, it will actually make the text red and the font Arial in this case. So that's the foundation for programming in HTML, as well as a little CSS. Now let's dive into Dreamweaver and start applying some of this knowledge.

Here I am in Dreamweaver, notice I've the index.html page open, and I have these various divs created, absolute positioned divs with certain IDs, okay. So you have this apDiv 4, okay, you have this you know Div2, and really they don't have a lot of meaning. What people would do is they start to define meaning to these various AP Divs or divs in general, they'd give them a specific ID name, like I can do here. And watch as I go into Split view I can just rename this to logo, for instance, hitting Enter, it changes it right here, div id.

The id = logo, and it changes that appropriately. Not only does it change that id to logo, it changes the selector. So let me go into CSS Styles, selecting All of the CSS Styles, you can see them all right here, and change that to logo, okay. But what people are actually doing is they are actually starting to name all of these divs with nav, with section, with header, pretty common stuff, so those have been standardized with HTML5.

So what we can do now is say for instance, for this one right here, this long bar right here, which is actually known as apDiv2, I can actually change that to an HTML5 tag known as nav, because that's what it is it's nav, okay. So let's make it even more descriptive. I can type that in here, but check this out, I can have that selected, going down here, right-clicking on this tag, I can use the Quick Tag Editor to edit that.

So right in here, deleting what I have there, type in--oh, look. I have code hinting for HTML5. Right there, I can select nav, do that less than sign and watch what happens. It's going to change the div id as well the closing tag right there, hitting Enter or Return, nav, nav, it's all good to go, but let's take a look. What happened in the styling? Well, the styling is in apDiv2, and that's not what this is referencing, this is referencing nav, so I just changed that name to nav just like that.

Much more meaning, really straightforward, and again, a standard works great! Coming down to this next one, as I select it, this is the apDiv3, again, changing it the same way by right-clicking, changing that div id and calling this header, why not, H-E-A-D-E--oh there it is header--selecting that, less than sign, hitting Enter, reapplying that style, changing this to header as well, that now has lot more meaning, it's just, much more helpful.

Lastly I can select this section of all this text, selecting that there, right-clicking, editing that, using the Quick Tag Editor. Again, I can just type it in there if I want to, but I like how this Quick Tag Editor edits not only the open tag, but also the closing tag like I did for header, header. So again, section--oh, look it highlights it--selecting that, less then sign, Enter or the Return key, and you can see right over here I need to change this to section as well.

That is much better, as I go back into Design view, everything looks just great, not only that, when I'm working with the code, the CSS, the tags, everything makes sense. And that's also going to make sense to the browsers. Okay, browser is going to be able to know how to render these different items, but here it's just going to make it much more easier for me to work in, now that I've added some HTML5 tags.

Show transcript

This video is part of

Image for Creating a First Web Site with Dreamweaver CS6
Creating a First Web Site with Dreamweaver CS6

30 video lessons · 39676 viewers

Paul Trani
Author

 

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

Are you sure you want to delete this note?

No

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.