Fght
Posts: 319
Joined: Thu Feb 05, 2015 10:26 pm

i'm looking for someone to check my website code..

Thu Jul 16, 2015 8:24 pm

do you volunteer or can recommend a place to ask this question? 8-)

Malman35
Posts: 425
Joined: Sun Nov 30, 2014 4:51 am

Re: i'm looking for someone to check my website code..

Thu Jul 16, 2015 10:51 pm

You could use an online validator like I have. https://validator.w3.org/nu/
If you don't understand an error you can ask for help here. Speaking of which I recently checked my website and it came up with errors for some code that had not given me problems (once I had asked here for help and somebody showed me the right way)

Here is the error and my code
Code

Code: Select all

<div id="line">
    <br>
    <a style="text-decoration:none; font-size:25px; color:#000000;" href="index.html"><img src=home.png width="150" height="50" alt="Home" style="border:3px solid"></a> 
    <a style="text-decoration:none; font-size:25px; color:#000000;" href="About.html"><img src=about.jpg width="150" height="50" alt="About" style="border:3px solid"></a> 
    <a style="text-decoration:none; font-size:25px; color:#000000;" href="Comments.html"><img src=comment.jpg width="150" height="50" alt="Comments" style="border:3px solid"></a> 
    <a style="text-decoration:none; font-size:25px; color:#000000;" href="Pictures.html"><img src=pic.png width="150" height="50" alt="Pictures" style="border:3px solid"></a> 
    <br>
</div>
<br>
And the error

Code: Select all

Error: Start tag a seen but an element of the same type was already open.
From line 131, column 5; to line 131, column 86
 <br>↩    <a style="text-decoration:none; font-size:25px; color:#000000;" href="index.html"><img s
Error: End tag a violates nesting rules.
From line 131, column 5; to line 131, column 86
 <br>↩    <a style="text-decoration:none; font-size:25px; color:#000000;" href="index.html"><img s
Fatal Error: Cannot recover after last error. Any further errors will be ignored.
From line 131, column 5; to line 131, column 86
 <br>↩    <a style="text-decoration:none; font-size:25px; color:#000000;" href="index.html"><img s

Fght
Posts: 319
Joined: Thu Feb 05, 2015 10:26 pm

Re: i'm looking for someone to check my website code..

Thu Jul 16, 2015 11:50 pm

so the validator of w3 covers all kinds of errors?

what if i've a link with two same clasess together?


Malman35
Posts: 425
Joined: Sun Nov 30, 2014 4:51 am

Re: i'm looking for someone to check my website code..

Fri Jul 17, 2015 2:12 am

Fght wrote:so the validator of w3 covers all kinds of errors?
I should cover all html errors (i don't know if it does javascript)
Fght wrote:what if i've a link with two same clasess together?
I am not quite sure what you mean by that.

Yes i see hmmm... did you check the "more options" area to make sure you selected the right character encoding and document type?
https://www.dropbox.com/s/bdkj3qxm0mqu4 ... 1.png?dl=0
http://validator.w3.org/#validate_by_uri+with_options


x3go
Posts: 4
Joined: Sun Dec 21, 2014 11:35 am

Re: i'm looking for someone to check my website code..

Fri Jul 17, 2015 11:15 am

I can take a look if you will share a link. :P

A good practice is to avoid Inline Styling (Style=""), and you should separate style from code (HTML).
using a style.css file for example is easier to maintain and apply changes.

@Malman35, you can simplify your code, here's a simple example you can play with: http://codepen.io/anon/pen/VLBpqZ

Code: Select all

<div id="line">
    <a href="index.html"><img src=home.png alt="Home"></a>
    <a href="About.html"><img src=about.jpg alt="About"></a>
    <a href="Comments.html"><img src=comment.jpg alt="Comments"></a>
    <a href="Pictures.html"><img src=pic.png alt="Pictures"></a>
</div>
Use this rules from a linked .CSS file or wrap up with <Style> tags inline:

Code: Select all

#line {margin-top: 25px; margin-bottom: 25px;}
#line a {text-decoration:none; font-size:25px; color:#000000;}
#line img {border:3px solid;width:150;height:50;}

Return to “Off topic discussion”