SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: HTML scripts

  1. #1
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTML scripts

    My html page is becoming too long and so i want to shorten it by putting related tags in a new file and link it to the original file.. Can this be done?? if yers, How??

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)

    too long

    If you mean the mark-up is too long, you can move all CSS and javascript to external files. And if you have server-side scripting (like PHP), put stuff that's common to many pages in "includes". If you mean the rendered page is too long, consider breaking up the page into smaller pages.

  3. #3
    SitePoint Addict dek's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ^^^What he said.

    If you can point us to the page, more specific advice can be given.
    Only dead fish go with the flow

  4. #4
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    noooo i have done all that. i mean my HTML code is getting too long. Is there a way to make it into separate files and then include them in the original html file

  5. #5
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nup cant do any including (other than js and css files) without server-side scripting

  6. #6
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)

    breaking up

    If the page is really long, you might be better off with more pages SEO-wise. If the page has H tags, maybe do something like make the H2-s into their own pages. Since you've already removed all the style and javascript from the mark-up, it will be easy to have multiple pages that look and act consistent.


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
  •