SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Nov 2000
    Posts
    740
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why doesn't text load first?

    I am trying to work out why the text doesn't appear on my page before the images load. I have php scripts and a MySQL backend if that makes any difference.

    Can anyone advise?

    My site is at:

    http://www.smartchoiceshopper.com/ma...ehold&filter=1

    Thanks,

    Jon

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Because you use tables for layout.

    The browser needs to know all of the table's content before it can start rendering anything. If you want swifter loading, you need to split your content into multiple, small, tables. Or better yet: use semantic HTML and CSS.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Guru
    Join Date
    Nov 2000
    Posts
    740
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok. Never heard of semantic HTML and CSS!

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Semantic HTML means that you use HTML elements for what they mean, e.g. <p> for paragraph, <h1> for level-one headings, <ul> for unordered list, <table> for tabular data, etc.

    CSS is Cascading Style Sheets, which takes care of all presentational aspects of a web page (that is not something HTML is supposed to do). You can use a single style sheet to control the presentation of an entire 10,000+ page site, and redesign the whole shebang by altering a single file. You can also have a style sheet for printer output (thus removing the need for 'printer friendly' versions of pages), for handheld devices, etc.

    Separating structure (HTML) from presentation (CSS) and behaviour (JavaScript) is a Good Thing, because your site will be much easier to maintain. It's a new way of thinking, though, and it takes some getting used to if you come from the old school of thinking in grids (tables) and 'painting with HTML.'

    Improved accessibility and better search-engine ranking are positive side-effects that are almost automatic from switching to semantic markup separated from presentation.
    Birnam wood is come to Dunsinane


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •