SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CAPITAL tags or lowercase tags?

    Are there any specific guidelines in using CAPITAL LETTERS for HTML/PHP tags rather than lowercase? Is it okay (in terms of search engine optimization) to have both capital letters tags and lowercase letter tags?

    Example:

    </TABLE>
    vs
    </table>
    If it doesn't matter, does someone have a recommendation or tool to go through hundreds of PHP/HTML pages and change all appropriate tags to lowercase or uppercase? Can DreamWeaver or Notepad++ or TextPad do such a thing (without screwing up any other text/source, etc)

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by forumsviewer View Post
    ...Is it okay (in terms of search engine optimization) to have both capital letters tags and lowercase letter tags?...
    It really does not matter, an HTML element is an HTML element regardless of case. However you should be consistent in what you use. I personally use lowercase because I'm too lazy to hold SHIFT. As for changing the HTML to one way or another, look at HTML Tidy.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,789
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    HTML doesn't care if you use <TABLE> <table> or <TaBlE> since it is not case sensitive.

    XHTML is case sensitive and requires all tags tro be in lowercase.

    In the early days people made their HTML tags all uppercase to make them stand out from the content. More recently most people use all lowercase since it saves holding the shift key (and if they are using XHTML rather than HTML then the tags must be in lowercase anyway).
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  4. #4
    SitePoint Addict
    Join Date
    Feb 2009
    Location
    Austin Texas
    Posts
    289
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think Search Engines care more about what's in between the tags than their case, unless the doctype is XHTML.

  5. #5
    Guru in training bronze trophy SoulScratch's Avatar
    Join Date
    Apr 2006
    Location
    Maryland
    Posts
    1,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vanishdesign View Post
    I think Search Engines care more about what's in between the tags than their case, unless the doctype is XHTML.
    Doctype being XHTML wouldn't really have a profound effect on search engines ( 99&#37; of "xhtml" is sent as text/html ), but a Content-Type would if the uppercase resulted in a yellow screen of death.
    Cross browser css bugs

    Dan Schulz you will be missed


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
  •