Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Jun 2005
    Location
    Manchester
    Posts
    3,187
    Tokens
    0

    Latest Awards:

    Default | XHTML - Tutorial |

    Hey guys.

    Normally I write PHP tutorials, but recently i've come across websites who are still using all dirty unclean HTML so i'm here too write a tutorial on cleaning up your code and making it XHTML compatible.

    Ok now people might say... Whats the difference between HTML and XHTML.

    And i'd say:

    There are a number of differences, all XHTML tags must be closed.

    XHTML is formatted or something in XML too reduce browser problems. Which is good

    Starting XHTML, now i'm assuming that all you Habboxilians know HTML ( HyperText Markup Language )

    XHTML is basically a stricter cleaner HTML.

    Now starting off.

    You'll need a w3 approved XHTML Doctype.

    There are three doctypes, there are strict, transitional and Frameset

    HTML Code:
    Strict
    
    <!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
    HTML Code:
    Transitional
    
    <!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    HTML Code:
    Frameset
    
    <!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> 
    Now.

    The harder thing which took me a bit too get used too and I still don't do this now. It's write your HTML format in lowercase letters I tent too use capitals for a lot.

    HTML Code:
    DOCTYPE HERE
    <html>
    <head>
    <title>my XHTML document</title>
    </head>
    <body>
    <p>Some random text</p>
    </body>
    </html>
    Thats a very standard and basic XHTML document.

    See how it's all lowercase and nicely set out. You have too be very careful in XHTML when nesting things as well you cannot make the simplest mistake, this is how strict it is.

    Some random snippets which might make your life a tad easier

    HTML Code:
    <b>Bold Text</b>
    Makes your text bold

    HTML Code:
    <i>Italic Text</i>
    Makes your text italic

    HTML Code:
    >
    <span style="text-decoration: underline;">The text that will be underlined here</span> 
    
    Now, this one may confuse you a bit. Valid XHTML has removed the old <u> tag and replaced it with a CSS tag which I personally and many would agree with me thing it's sooo better.

    Even images have changed in XHTML no more silly short ones.

    example:

    HTML Code:
    <img src="pic.gif" style="width: 10px; height: 10px;" alt="pic.gif" />
    And you can do all the other cool things, like link external style sheets etc.

    So hope this has given you a quick insight into the world of XHTML, try using it for better websites.

    - Dan

  2. #2
    Join Date
    Oct 2005
    Location
    PHYSICAL EDUCATION LAND
    Posts
    699
    Tokens
    0

    Default

    Thanks - I'll read though it after I get dressed.

  3. #3
    Join Date
    Jun 2005
    Location
    Manchester
    Posts
    3,187
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Da-Funk
    Thanks - I'll read though it when I get dressed.
    Just needed too know that lol!

    - Dan

  4. #4
    Join Date
    Oct 2005
    Location
    PHYSICAL EDUCATION LAND
    Posts
    699
    Tokens
    0

    Default

    Lmao I edited my post, read through it.

  5. #5
    Join Date
    Jun 2005
    Location
    Manchester
    Posts
    3,187
    Tokens
    0

    Latest Awards:

    Default

    Still says that.

    LOL!

    - Dan

  6. #6
    Join Date
    Oct 2005
    Location
    PHYSICAL EDUCATION LAND
    Posts
    699
    Tokens
    0

    Default

    No, now it says "AFTER"

  7. #7
    Join Date
    Jun 2005
    Location
    Manchester
    Posts
    3,187
    Tokens
    0

    Latest Awards:

    Default

    ahh,

    Yeah I see now lol.

    Bit dirty lol

    Anyways comments on the tutorial.

    - Dan

  8. #8
    Join Date
    Oct 2005
    Location
    PHYSICAL EDUCATION LAND
    Posts
    699
    Tokens
    0

    Default

    It's very understandable - I'll probobaly remember it, but just in case I'm booking marking ;P

  9. #9
    Join Date
    Jun 2005
    Location
    Manchester
    Posts
    3,187
    Tokens
    0

    Latest Awards:

    Default

    Cheers.

    I try too explain it so even the newbies at HTML and XHTML can understand it.

    - Dan

  10. #10
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    I got a book on Upgradeing to XHTML some time ago Nice guide its useful

Page 1 of 2 12 LastLast

Posting Permissions

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