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
    Nov 2010
    Location
    Berkshire, Newbury
    Posts
    572
    Tokens
    182
    Habbo
    :.justben.:

    Latest Awards:

    Default First time in ages and stuck

    The header has a background color but no text why and ino its terrible im really suckish atm idk why but please help btw i cant add rep on ipad sorry
    <HTML>
    <Body>

    <html><head>learning to code more</head><body style=
    "background-color:yellow;"><h2 style="background-color:red;">of code is memorable"</h2>

    </body>
    </HTML>

    <h1><b>learning html and css</b></h2 style

    <p><em>learning css is insanely hard<p>

    <HTML>
    <Body>

    <a href= "http://www.w3schools.com">
    This is a learning tool </a>

    <HTML>
    <body>

    <p>the hr / tag adds a horizontal</p>
    <hr />

    </body>
    </HTML>

    <p>there other text types like<sub> this</sub>And like<sup> this</sup> the text is <sub> and the second one is </sup><p>

    </body>
    </HTML>
    Loading Perfection....

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

    Latest Awards:

    Default

    The whole thing is just messed up. You've got the whole basic structure wrong - you don't want multiple <html>, <body> and <head>. Additionally you've got multiple unclosed tags and some tags are just totally incomplete. I think you need to start again from the basics and get the proper structure right to start with.

    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <title>This is where the title of the page goes</title>
    </head>
    <body>
    <h1>This is a header</h1>
    <p>Here is some misc. text</p>
    </body>
    </html>
    That is just a really basic page. Note I've not opened multiple <html>, <body> or <head> tags and I've closed all the tags. Also I've placed the title of the page in the appropriate element.

  3. #3
    Join Date
    Nov 2010
    Location
    Berkshire, Newbury
    Posts
    572
    Tokens
    182
    Habbo
    :.justben.:

    Latest Awards:

    Default

    Was told u need it every new script
    Loading Perfection....

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

    Latest Awards:

    Default

    What do you mean every script? HTML is a markup language, nothing to do with scripting/programming. Regardless, clearly what you have been told is wrong. In a single webpage you don't have multiple <html>, <body> and <head> tags.

    Quote Originally Posted by :.justben.: View Post
    Was told u need it every new script

  5. #5
    Join Date
    Nov 2010
    Location
    Berkshire, Newbury
    Posts
    572
    Tokens
    182
    Habbo
    :.justben.:

    Latest Awards:

    Default

    Quote Originally Posted by Tomm
    What do you mean every script? HTML is a markup language, nothing to do with scripting/programming. Regardless, clearly what you have been told is wrong. In a single webpage you don't have multiple <html>, <body> and <head> tags.
    So only have
    </body>
    </html> ?

    ---------- Post added 09-04-2012 at 02:13 AM ----------

    When i finished
    Loading Perfection....

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

    Latest Awards:

    Default

    Look at the example I posted above, I only open <html> and close (</html>) it once. Nested in <html> I only have one <body> and <head> block.

    Quote Originally Posted by :.justben.: View Post
    So only have
    </body>
    </html> ?

    ---------- Post added 09-04-2012 at 02:13 AM ----------

    When i finished

  7. #7

    Default

    First of all, what is your first language? Because your English is quite poor. Secondly, the <html> tag just defines that it's a HTML document, therefore you only need it once. You also use the <body> tag once because well, a webpage with more than one body just wouldn't make sense, would it?

    Like the above said, HTML isn't a scripting language so whoever told you this obviously doesn't know what he/she is doing.

  8. #8
    Join Date
    Jan 2011
    Location
    England, United Kingdom
    Posts
    253
    Tokens
    40
    Habbo
    Pegle

    Latest Awards:

    Default

    Because the body is everything you see on the screen (bar the title in the window/tab) you don't have multiple screens for each bit of your website do you?

    And in reply to above, if English isn't his first language then he might assume that a HTML document is called a script.


  9. #9
    Join Date
    Nov 2010
    Location
    Berkshire, Newbury
    Posts
    572
    Tokens
    182
    Habbo
    :.justben.:

    Latest Awards:

    Default

    Ok thanks for helping btw how do i color the background of the header then which was my original question

    ---------- Post added 09-04-2012 at 11:40 AM ----------

    Got it working is this a bit better
    <HTML>
    <Body>

    <html><head>learning to code more</head><body style=
    "background-color:yellow;"><h2 style="background-color:red;">of code is memorable"</h2>

    <h1><b>learning html and css</b></h2 style

    <p><em>learning css is insanely hard</em></p>
    <a href= "http://www.w3schools.com">
    This is a learning tool </a>

    <p>the hr / tag adds a horizontal</p>
    <hr/>

    <p>there other text types like<sub> this</sub>And like<sup> this</sup> the text is <sub> and the second one is </sup><p>

    </body>
    </HTML>
    Loading Perfection....

  10. #10
    Join Date
    Jun 2006
    Location
    England, UK
    Posts
    12,315
    Tokens
    33,716
    Habbo
    dbgtz

    Latest Awards:

    Default

    If I remember correctly, you're not supposed to put content in the head tags hence why you can do <body style = "css"> but not <head style = "css">. Also rather then repeating the styles, just embed some CSS seperately within the head tags as shown.

    Code:
    <html>
    <body>
    
    <head>
    <title>This displays on the tab</title>
    <style type = "text/css">
    <!-- style rules can go here -->
    </style>
    </head>
    
    <body style="background-color:yellow;">
    <h2 style ="background-color:red;">of code is memorable</h2>
    
    <h1><b>learning html and css</b></h1>
    
    <p><em>learning css is insanely hard</em></p>
    <a href= "http://www.w3schools.com"> This is a learning tool </a>
    <p>the hr / tag adds a horizontal</p>
    
    <hr/>
    
    <p>there other text types like<sub> this</sub>And like<sup> this</sup> the text is <sub> and the second one is </sup><p>
    
    </body>
    </html>

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
  •