Start learning with our library of video tutorials taught by experts. Get started

Exploring CSS Positioning

HTML div tags


From:

Exploring CSS Positioning

with Candyce Mairs

Video: HTML div tags

When working in CSS Positioning, we need HTML and CSS to work together. So, the first step is the HTML side, and that's what I want to take a look at now. And what we're going to do is create a new HTML page. So I'll just got to File > New HTML Page, and within this page we have all the basic HTML tags. What I want to do is add some additional HTML tags to the page. Let me go ahead and save this first, and when I go to Save it, because I have a project defined it saves it to that folder automatically. So, I'm going to name this, html-div-tags, and I'm going to use dashes between words as my standard throughout the course. As you can see, that's how your pages are set up. So, any time I save multiple words, there will be a dash between them. Now what I want to do is use this new page to demonstrate the DIV Tag, because it's an important tag when we're working in CSS Positioning. Within the CoffeeCup editor that I'm using as my HTML editor. There is a tab called Code, and when I click on that tab and go to this last icon up at the top for XHTML, that's the DOCTYPE I'm using. It gives me a listing of all of the HTML tags coded as XHTML. And what this does is allow me to drag those tags out onto the page, so you don't have to watch me type them all.
Expand all | Collapse all
  1. 1m 13s
    1. Welcome
      1m 13s
  2. 33m 20s
    1. Why CSS positioning?
      5m 50s
    2. HTML editors
      3m 18s
    3. Getting set up
      3m 39s
    4. Previewing pages in browsers
      3m 51s
    5. Customizing the HTML editor
      5m 32s
    6. Exploring browser variances
      5m 16s
    7. Browser extensions
      5m 54s
  3. 30m 33s
    1. HTML vs. CSS: Which does what?
      9m 55s
    2. HTML div tags
      4m 57s
    3. CSS properties
      6m 21s
    4. The CSS box model
      9m 20s
  4. 28m 46s
    1. Planning the page layout
      3m 47s
    2. Building the header box
      6m 23s
    3. Positioning with HTML
      3m 36s
    4. Positioning with CSS
      8m 21s
    5. Foreground vs. background content
      6m 39s
  5. 25m 44s
    1. Building the menu box
      5m 7s
    2. Adding the menu links
      4m 58s
    3. Formatting the menu with CSS
      6m 43s
    4. Positioning the menu with CSS
      8m 56s
  6. 21m 42s
    1. Adding the middle column
      6m 29s
    2. Creating a CSS rule for the column
      6m 20s
    3. Adding CSS rules for the column
      8m 53s
  7. 19m 49s
    1. Adding the right column and inserting images
      7m 33s
    2. Completing the right-column content
      4m 18s
    3. Formatting the right column using CSS
      7m 58s
  8. 26m 14s
    1. Understanding the float property
      6m 5s
    2. Applying the floats
      6m 1s
    3. Finishing the floats
      6m 24s
    4. Adding CSS properties to the right column
      7m 44s
  9. 30m 59s
    1. Setting up for background colors
      5m 49s
    2. Adding a footer
      8m 50s
    3. Adding the background colors
      7m 20s
    4. Positioning the footer
      9m 0s
  10. 16m 38s
    1. Comparing the web page to the graphic design
      6m 50s
    2. Adjusting the web page as needed
      4m 25s
    3. Adding the final touches
      5m 23s
  11. 2m 43s
    1. Closing thoughts
      2m 43s

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
Exploring CSS Positioning
3h 57m Beginner May 24, 2012

Viewers: in countries Watching now:

CSS enables you to control the look and layout of a web page much more precisely than you could with HTML alone, but it can be time-consuming to learn. In this workshop, expert developer Candyce Mairs makes styling a quick and easy process, walking you through the process of adding content to a web page and using CSS to position that content. Candyce explains CSS positioning concepts like the CSS box model, floats, and clears and demonstrates how HTML and CSS work together to create the look of your web page. By speaking the same language as the browser, you can learn to work with the browser to place content accurately and easily.

Topics include:
  • Previewing pages in browsers
  • Customizing the HTML editor
  • HTML vs. CSS: which does what?
  • Building the header area
  • Adding the navigation menu
  • Positioning using a float
  • Adding background colors and images
  • Comparing the web page to the graphic design
Subjects:
Web Web Design video2brain
Software:
CSS
Author:
Candyce Mairs

HTML div tags

When working in CSS Positioning, we need HTML and CSS to work together. So, the first step is the HTML side, and that's what I want to take a look at now. And what we're going to do is create a new HTML page. So I'll just got to File > New HTML Page, and within this page we have all the basic HTML tags. What I want to do is add some additional HTML tags to the page. Let me go ahead and save this first, and when I go to Save it, because I have a project defined it saves it to that folder automatically. So, I'm going to name this, html-div-tags, and I'm going to use dashes between words as my standard throughout the course. As you can see, that's how your pages are set up. So, any time I save multiple words, there will be a dash between them. Now what I want to do is use this new page to demonstrate the DIV Tag, because it's an important tag when we're working in CSS Positioning. Within the CoffeeCup editor that I'm using as my HTML editor. There is a tab called Code, and when I click on that tab and go to this last icon up at the top for XHTML, that's the DOCTYPE I'm using. It gives me a listing of all of the HTML tags coded as XHTML. And what this does is allow me to drag those tags out onto the page, so you don't have to watch me type them all.

So, what I'm going to do is use the DIV Tag. That's one of the most important tags in CSS Positioning. So, I'm going to drag some of those tags out and I'll drag three of them. So, if you're using a different type of editor, what we want are three separate DIV Tags. Now the first one is going to say, this is div 1. The second one is going to say, this is div 2 and div 3. So, what I'm going is creating multiple DIV Tags on the page. So, do this in whatever manner you like within your specific editor. I'll save the page, and now that I've saved the page, if we preview this, let's take a look at what happens.

I'll go over to my local preview, and I'm going to use Firefox for this one, and you can see, hm. Each DIV is shown on its own separate line in the browser. How can that be? Well, that's what a DIV Tag does, it places content into its own space. Because div 1 is the first item listed on the page that becomes the first line, within the browser itself. So, we know that what a DIV Tag does is place content in its own space, or on it's own separate line.

What happens if I duplicate this? I'll just copy and paste it, so we have a few more copies. I don't worry about the numbers here. I just want to show you what happens if I use a SPAN Tag instead. So, I'm going to take a couple of these in the middle. And I'm going to convert them to a SPAN Tag instead of a DIV. You'll see SPAN Tags used quite often with CSS. But they're used in a particular way and that's because of the properties built into the tag. So, if I go over to Firefox again, notice my SPAN Tags, they're both on the same line, my DIV Tags are not.

So, what does a DIV Tag do? What a DIV Tag does automatically within HTML is place content in its own line. What a SPAN Tag does in HTML is absolutely nothing. It's the only HTML tag that has no built in properties. So, that's why we tend to use a DIV Tag when we're working in CSS Positioning. We can surround content, and what this does is segregate that content out into its own space.

So, that is the difference between a SPAN Tag and a DIV tag. And the DIV Tag is where we start all of our HTML pieces. Everything related to CSS Positioning is usually done using the DIV Tag. So, that is what an HTML DIV Tag does.

There are currently no FAQs about Exploring CSS Positioning.

Share a link to this course
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.
Upgrade now


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.

Upgrade now

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 Exploring CSS Positioning.

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


OK

Course retiring soon

Exploring CSS Positioning will be retired from the lynda.com library on April 24, 2014. Training videos and exercise files will no longer be available, but the course will still appear in your course history and certificates of completion. For updated training, check out CSS: Page Layouts in the lynda.com Online Training Library.


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
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



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.

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