CodeClerks

Does invalid HTML work?



Write the reason you're deleting this FAQ

Does invalid HTML work?

Let's say you write invalid HTML code. Will it still work? If so, why would it work if it's invalid?

Comments

Please login or sign up to leave a comment

Join
karoshio
Hi Caitlin,

That will really depend on what you mean by 'work'. If by work you simply mean display what you have done then yes it will, it won't show an error and nothing else like it may when working with another language like PHP for example. Being that HTML is a markup language there's no reason it would work any differently that it does.

Regards,
Karoshio



Are you sure you want to delete this post?

jakemadness
If you have a image on a website in the IMG tag and no ALT attribute it is marked as invalid by W3 Validator the image will still display but it is marked as invalid. The smallest mistake can make a HTML element / node / tag invalid it all depends on how invalid the HTML is to determine if it works. Does invalid HTML work?



Are you sure you want to delete this post?

dennis123
It's not like the code will work or not. Whichever tags are valid they will be compiled and displayed and the ones that are incorrect will not.



Are you sure you want to delete this post?