Validation folow up

yes i have made this post before, but it has been closed… cannot make a post there

i made a site before i knew validations

www.forallthetime.com

the site has been up for quite a while, no signifcant problems

when i validated i got a bunch of errors

i am overwhelmed with so many errors…

i can handle the PDF errors

i am not asking for the proper code, wont do that to you :slight_smile:

** lets say i leave it as it is now… seems fully functional (1 minor issue that corrects itself)
what if i leave it not validated?

does anything bad happen?

** if it works, need i worry?

seriously, thank you!

HA!!!

www.forallthetime.com/project8/index.html

THATS the proper site!!

sorry :slight_smile:

You can provide a direct link to the validation errors. That would be useful.

Often one error can cascade into lots of other errors, which all go away if the first one is dealt with. Also, browsers can often compensate for these “errors”, so you may get away with it anyway.

There are no internet police† who will come along to arrest you. You just may lose visitors if the site doesn’t work properly. :slight_smile:

Okay, there’s Google, who may ostracize you from its website, but who needs Google, anyway?

1 Like

Running your site through the HTML Validator I get only 5 errors, each of which should be easy enough to fix.

1 Like

Especially as I already pointed out the problems in the other thread :slight_smile:

What is it that you don’t understand about this following error:

Error : Element a not allowed as child of element ul in this context

It’s pretty clear that its telling you that you can’t have an a element as a direct child of a ul.

You have this html:

  <ul class="main-nav">
    <li><a href="index.css" class="active">Links, Nearby Places of Interest & Programs</a></li>
    <a href="Articles-Shorts-Updates.html">Articles-Shorts-Updates</a>
    <li><a href="about-us.html">About Us</a></li>
  </ul>

Isn’t it obvious what is wrong there? This is basic html. You need to be able to spot this for yourself and I have explained this quite a few times now so there is some piece of the puzzle you are not seeing,:slight_smile:

The html should be like this:

<ul class="main-nav">
  <li><a href="index.css" class="active">Links, Nearby Places of Interest & Programs</a></li>
  <li><a href="Articles-Shorts-Updates.html">Articles-Shorts-Updates</a></li>
  <li><a href="about-us.html">About Us</a></li>
</ul>

The only element that can be a direct child of a ul is a li element. All other content must be inside a matched pair of li tags.

You can have anything you like inside the pair of list tags (including nested uls or indeed any correct html structure) but nothing can live outside the list tag as a direct child of the ul.

**Error** : Stray end tag div.

At a guess I would say that means you have a stray closing div tag :slight_smile:

Just remove it or look and see if you have removed the starting div tag by mistake?

You have two of those stray tags which makes me think you have deleted perhaps the page wrapper and some other wrapper by mistake. However if you remove the stray div tags and it doesn’t break anything then you probably didn’t need those elements anyway,

It all depends on what you mean by bad?

If at some stage a javascript program is iterating through your list its going to likely break when it runs into an a tag instead of a list tag.

Most browsers will handle the missing list tag ok but some may not give you a new line and some will. What happens if the list is automatically numbered. What happens in that case?

What’s the point of writing good code if bad code works?

This is what happened at the beginning of the century and we ended up with millions and millions of broken sites. If you don’t look after your code then all bets are off.

That’s not to say that you need to squash all errors because in some cases that’s not possible but you do need to understand them so that you can make the choice to ignore them. Just saying ‘I don’t know’ is not good enough. You need ‘to know’ so that you can safely ignore it.

Html errors are simple and easy fixes. Third party code (plug-ins etc) are generally difficult to fix and most times won’t make a difference.

Learn the rules so you know how to break them properly.

Knowledge is the key :slight_smile:

2 Likes

i have seen the errors remain after the correct code is published

simply takes some time for some reason :slight_smile:

thanks for the code!

i am always grateful for that

after this project is complete, i fully intend to really focus on the (very) basics…

i do want to write my own code!

no more code pens for a while :slight_smile:

thanks!

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.