Results are out! Find what you need...fast. Get quick advice or join the chat
Hey there! Sign in to join this conversationNew here? Join for free

can you check out my code?

Announcements Posted on
    • Thread Starter
    • 3 followers
    Offline

    ReputationRep:
    i am really bad at coding and i have just started learning.

    heres my code

    <html>
    <head>
    <title>This page is foo</title>
    </head>

    <body>

    <div style="position:absolute;top:100px:left:450px">

    <a href="www.google.co.uk">Hello world.</a> <img src=penguins.jpg/>
    <br>
    <a href="www.google.co.uk">Hello world.</a> <img src=penguins.jpg/>
    <br>
    <a href="www.google.co.uk">Hello world.</a> <img src=penguins.jpg/>
    <br>
    <a href="www.google.co.uk">Hello world.</a> <img src=penguins.jpg/>
    <br>

    </div>

    <div>

    <h1>this is foo!</h1>
    <p>afsadsf</p>
    <span></span>
    <br/>

    </body>

    </html>

    i tried to add a picture in and it didn't work and i tried to put links to top right corner and it didn't work.

    can anyone help and please i am really struggling so can you give me some tips please.
    • 4 followers
    Offline

    ReputationRep:
    That rogue bit of formatting has pointed out one of your issues:

    While you have
    Code:
    top: 100px :
    it should be
    Code:
    top: 100px ;
    (ie. with a semicolon)

    Also, if you want to put something in the top-right, you could write
    Code:
    top: 0px; right: 0px;
    instead.
    • Thread Starter
    • 3 followers
    Offline

    ReputationRep:
    (Original post by roblee)
    That rogue bit of formatting has pointed out one of your issues:

    While you have
    Code:
    top: 100px :
    it should be
    Code:
    top: 100px ;
    (ie. with a semicolon)

    Also, if you want to put something in the top-right, you could write
    Code:
    top: 0px; right: 0px;
    instead.
    thanks but can you check my code again because it still isn't formatted correctly. can you copy it to notepad and check it for me please.

    <html>
    <head>
    <title>This page is foo</title>
    </head>

    <body>

    <div style="position:absolute;top:0px ;left:0px">

    <a href="www.google.co.uk">Hello world.</a> <img src=penguins.jpg/>
    <br>
    <a href="www.google.co.uk">Hello world.</a> <img src=penguins.jpg/>
    <br>
    <a href="www.google.co.uk">Hello world.</a> <img src=penguins.jpg/>
    <br>
    <a href="www.google.co.uk">Hello world.</a> <img src=penguins.jpg/>
    <br>

    </div>

    <div>

    <h1>this is foo!</h1>
    <p>afsadsf</p>
    <span></span>
    <br/>

    </body>

    </html>
    • 4 followers
    Offline

    ReputationRep:
    (Original post by non)
    <div style="position:absolute;top:0px ;left:0px">
    Code:
    top: 0px;
    right: 0px;
    I do hope that was a genuine mistake.
    • 22 followers
    Offline

    ReputationRep:
    And because I'm pedantic; this is markup, not code.
    • 0 followers
    Offline

    ReputationRep:
    Good Lord.

    Kudos for starting to learn: You've a long way to go.

    Brush up on CSS first.
    Secondly live links need to have http:// infront of them.

    Thirdly, I'd suggest using a top padding.

    Last, I'd suggest you use an image that has been routed to a host.

    Here, try this:

    <html>
    <head>
    <title>This page is foo</title>
    </head>

    <body>

    <div style="position:absolute; top: 50px ;left: 0px;">

    <a href="http://www.google.co.uk"> <img src=http://www.isc.tamu.edu/~lewing/linux/sit3-shine.7.gif> Hello world.</a>
    <br>
    <a href="www.google.co.uk">Hello world.</a> <img src=penguins.jpg/>
    <br>
    <a href="www.google.co.uk">Hello world.</a> <img src=penguins.jpg/>
    <br>
    <a href="www.google.co.uk">Hello world.</a> <img src=penguins.jpg/>
    <br>

    </div>

    </body>

    </html>


    P.s. If you want the image to be part of the link, you need to place it inside the <a href> tag.
    • Thread Starter
    • 3 followers
    Offline

    ReputationRep:
    (Original post by tamimi)
    Good Lord.

    Kudos for starting to learn: You've a long way to go.

    Brush up on CSS first.
    Secondly live links need to have http:// infront of them.

    Thirdly, I'd suggest using a top padding.

    Last, I'd suggest you use an image that has been routed to a host.

    Here, try this:

    <html>
    <head>
    <script type="text/javascript">var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);</script>
    <title>This page is foo</title>
    </head>

    <body>

    <div style="position:absolute; top: 50px ;left: 0px;">

    <a href="http://www.google.co.uk"> <img src=http://www.isc.tamu.edu/~lewing/linux/sit3-shine.7.gif> Hello world.</a>
    <br>
    <a href="www.google.co.uk">Hello world.</a> <img src=penguins.jpg/>
    <br>
    <a href="www.google.co.uk">Hello world.</a> <img src=penguins.jpg/>
    <br>
    <a href="www.google.co.uk">Hello world.</a> <img src=penguins.jpg/>
    <br>

    </div>

    <script type="text/javascript">if(!NREUMQ.f){NREUMQ .f=function(){NREUMQ.push(["load",new Date().getTime()]);var e=document.createElement("script ");e.type="text/javascript";e.async=true;e.src=" https://d1ros97qkrwjf5.cloudfront.net/38/eum/rum-staging.js";document.body.append Child(e);if(NREUMQ.a)NREUMQ.a(); };NREUMQ.a=window.onload;window. onload=NREUMQ.f;};NREUMQ.push(["nrf2","beacon-1.newrelic.com","6d735935d6",791 989,"ZFQAZkYFX0tYU0JZW10eN0BdS1B SWEgYQFxD",0,151,new Date().getTime()]);</script>
    </body>

    </html>


    P.s. If you want the image to be part of the link, you need to place it inside the <a href> tag.
    thanks for the help. sorry for the late reply.

    what does top padding mean?

    i sort of changed the code, its here

    <html>
    <head>
    <title>My Own Webpage!</title>
    </head>
    <body>

    <img src="Penguins.jpg"width="102.4" height="76.8"><a href="https://www.google.co.uk"> <font size="10">hello world!</font></a>.


    <h2>Welcome to my webpage</h2>

    <p>Coming soon will be my completed webpage that will wow and impress you!</p>


    </body>
    </html>

    i don't know what else i should do, i know it's really simple. i'm struggling to do anything else so what would you recommend for me to learn?

    thanks for your help.

    also, can you see the penguin on my website?
    • 0 followers
    Offline

    ReputationRep:
    Like tamimi said, CSS is definitely the next step in designing websites for you.

    Also,

    <img src="Penguins.jpg"width="102.4" height="76.8">

    You can't have a decimal amount of pixels (which is what width and height are measured in).

    A really good tutorial on HTML/CSS is http://cssslicingguide.com/, it pretty much sets you up with the whole basics you need

    It goes over the differences in padding,marigins,borders etc, everything, it's what you need.
    • 0 followers
    Offline

    ReputationRep:
    (Original post by non)
    thanks for the help. sorry for the late reply.

    what does top padding mean?

    i sort of changed the code, its here

    <html>
    <head>
    <title>My Own Webpage!</title>
    </head>
    <body>

    <img src="Penguins.jpg"width="102.4" height="76.8"><a href="https://www.google.co.uk"> <font size="10">hello world!</font></a>.


    <h2>Welcome to my webpage</h2>

    <p>Coming soon will be my completed webpage that will wow and impress you!</p>


    </body>
    </html>

    i don't know what else i should do, i know it's really simple. i'm struggling to do anything else so what would you recommend for me to learn?

    thanks for your help.

    also, can you see the penguin on my website?
    No, only you can see that penguin because the penguin is stored on your computer. When I run the code, it'll try to run "Penguin.jpg" on my computer. The code will find that no such file exists and it will terminate.

    When you have a website, you have your code in an html file, and with it you'd have penguin.jpg so that anyone who tried to run your code will be able to reach the penguin.

    I hope that makes sense.

    If you want others to see the penguin, you must have it somewhere in common between the users. I.e. on the internet. This is why when I posted the penguin with the full URL, anyone on the internet could see it, whilst you only posted "Penguin.jpg" which leads nowhere except for you.

    Top padding is a CSS element. It pushes content downwards. Stop trying to avoid using CSS. Html on its own will get you nowhere.

    Read this Article by Ian Lloyd. It will help you get your head round the role of CSS in html http://www.sitepoint.com/html-css-beginners-guide/

    In short, Html is raw data. CSS makes it pretty and presentable.

    It's the difference between this http://www.redcharming.com/images/ilssawebsite.png

    and this
    http://www.kavoon.com/


    (For example)


    Next thing you should pick up is probably how to index files correctly. Nail down using CSS. Try composing a full page. Title and correctly positioned logo using css.
    Use full http:// urls so that we also can see what you're doing.
    If you're feeling up for stepping up, use a separate file for your css code and learn how to call css code using <div id="name">

    When you've got that down, try using the <a href="link"> tag.


    Much after that, we can talk about Filing, PHP and building a database.
    • 26 followers
    Offline

    ReputationRep:
    (Original post by JoeDevise)
    I think this is the best free way for you to start learn HTML and CSS , or other programming language .

    html.net/tutorials/html/
    Is there a reason why you are resurrecting loads of old threads?

Reply

Submit reply

Register

Thanks for posting! You just need to create an account in order to submit the post
  1. this can't be left blank
    that username has been taken, please choose another Forgotten your password?
  2. this can't be left blank
    this email is already registered. Forgotten your password?
  3. this can't be left blank

    6 characters or longer with both numbers and letters is safer

  4. this can't be left empty
    your full birthday is required
  1. By joining you agree to our Ts and Cs, privacy policy and site rules

  2. Slide to join now Processing…

Updated: October 12, 2012
New on TSR

GCSE mocks revision

Talk study tips this weekend

Article updates
Useful resources
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.