Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6037047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:00:57+00:00 2026-05-23T06:00:57+00:00

I’m getting into HTML right now and today I’m learning about page layout. I

  • 0

I’m getting into HTML right now and today I’m learning about page layout. I want to understand the algorithm that the browser uses to lay out a web page so that I can better anticipate where a div will show up based upon my HTML.

I understand that:

  • There are block-like elements and span-like elements.
  • Block-like elements take up as much vertical space as needed and by default all horizontal space.
    • If you add float styling or absolute positioning, then a div takes up as much horizontal space as needed or you can optionally set a width value.
  • Span-like elements take up only as much space as needed.

Where I begin to become unclear is what happens when I start using the clear:both, or when nested divs are involved.

I think what I’m looking for is a notion of a cursor that the browser uses as it lays out the document. If such a notion exists, then could you explain how it works. Otherwise please point me information that you feel will be helpful.

For the sake of simplicity, assume a simple model for HTML objects – only width and height, nor margins or padding, etc.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:00:58+00:00Added an answer on May 23, 2026 at 6:00 am

    I don’t think there is an actual cursor, although browsers may internally use something like that. There are a lot of rules (search for ‘Box Model’, or even better, ‘Visual Formatting Model‘) that determine how pages should be displayed.
    You are right that there are blocks and inline elements. Blocks do indeed take up all horizontal space unless specified otherwise. They size vertically, unless specified otherwise. That fact should answer your question about the nested divs too.

    As far as I can tell, you do have some basic understanding, which is about right too. But instead of pasting the entire documentation about all (incompatible!) versions of the box model here, I think it’s best to find some information about it, starting on the w3.com website.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.