how to validate html code - html

i want to check the mistake of our html code.
are you suggest me some method in firefox to improve mark up code and solve old code mistake.
How to edit the html. who give me error list node by node like a ul is missing etc.

I think you need to look at the Web Developer Toolkit and Firebug plugins. Between them you can do just about anything you need to do in terms of debugging html and css.

Firefox addon:
HTML Validator
W3C:
W3C Validator

HI,
You should use firebug for this will help to developer to know about error or mistake.
and
http://validator.w3.org/ is also help to know mistakes and some software as dreamweaver and notepad++ will help.

Try going to http://validator.w3.org/

You're after this: http://validator.w3.org/.

Not sure what you're referring to specifically. If you're talking about W3C validation you can access the validator tool here.
If something isn't displaying right you could install firebug (Firefox addon) to see what's happening, though this is more of a CSS issue than html.
Without knowing the specifics of your problem it is hard to give more specific advice than that.

If you're using Java on the server side, you can add the JTidy servlet to your web.xml to validate all HTML generated by your web application.

Related

CSS : How do fix W3 Validation Error caused by Genesis theme

I am new to this board so please be sympathetic about my issue.
After verifying my website vocaloid.de/Wordpress/ with the W3C CSS validator, I got multiple parsing and value errors. I tried disabling all plugins except the one that causes the css failure. The errors seem to come from the html source code. I would like to know how to fix this. Probably this caused by a wrong coding. I'm not sure..
I hope that I can learn troubleshooting as soon as possible to help others.
I suggest you to submit in w3c validator and check what source in error type. Then you make it correct one by one. Check all the checkboxes there and find the clean or tidy source, copy that if it can help you.

quickest way to find broken DIVs

I have a site that is calling a great deal of HTML from a third party source. Trouble is, I think they are returning malformed code to me.
I need a quick way to find additional DIV closures, is this possible?
create a page calling just the provided code then validate it - W3C Validator
Just install View shource chart add on for firefox and u can find the source generated in a formatted manner which is easy to find the unwanted tags..
You can try this:
http://www.tormus.com/en/tools/div_checker
Will find non matching divs for you. Very helpful
Try w3 org validator
While an IDE is not specifically mentioned, I would highly recommend putting the code into an IDE.
In Dreamweaver CS6 you can Validate directly to WC3 from within Dreamweaver. When an error is found you can go directly to that portion of the code and leverage the tools of the IDE.

best HTML validator/parser?

I have a large HTML file, and it looks like some tags are not closed. It's hard to find it. I am using VIM as the editor.
Is there any good way to find it?
You can validate your html using http://validator.w3.org/
Just make sure you specify the DOCTYPE correctly and it'll find anything that is invalid.
I assume you are on running Linux?! If so, you could try Eclipse
It is a complete IDE, which will help you in many cases and make programming a lot more efficient
Just use Notepad++. It is free and light weight code editor, and I already found many unclosed tags in my html with it...
HTML Validator (extension for Firefox) has helped me in the past. You need to load the page in the browser to find the errors.
If you can put you code online you could try Dr. Watson.
Another validator to try is the CSE HTML Validator. The online version is here:
http://www.OnlineWebCheck.com/

Tool to find malformed HTML?

I'm looking for a tool that could help me fix malformed HTML. For example:
<div id="foo">
<div id="bar">
<span>Test</span>
</div>
The tool would detect a missing and inform me the the div with id 'bar' on line 2 is not closed. I know about the w3c validator (using it with the Web Developer Toolbar). But I find the validator tool slow to use. Additionally, once a tag is not closed, the rest of the page generates lots of errors.
This tool can either be a standalone application or a browser plugin.
I'm using Eclipse, JSP, JSTL and jQuery to generate HTML. Even if Eclipse give me some indication on malformed HTML, I have mostly generated code. Therefore, it would be best if the tool analyze the resulting page.
This sounds like a job for HTML Tidy.
HTMLTidy will fix your errors
xmllint will find your errors
Even the W3C Validator will find your malformed/unclosed HTML.
I would, as a rule, always be sure to pass my HTML and CSS through their validators, though HTML Tidy is a nice little app to have around too.
https://addons.mozilla.org/en-US/firefox/addon/249 This firefox extension has done me good as well...
If you want a command line interface, you can use: https://github.com/yaniswang/HTMLHint
It has also its grunt plugin: https://github.com/yaniswang/grunt-htmlhint

Show HTML errors in Google Chrome?

Can Google Chrome show HTML errors (e.g. unclosed <div> tags)?
If so, how does one do it?
~Use HTML Validator extension.~
https://chrome.google.com/webstore/detail/html-validator/mpbelhhnfhfjnaehkcnnaknldmnocglk.
Another options is to use the W3C validator "favelets" to open the W3C validator from a bookmark.
http://validator.w3.org/favelets.html
I'm not sure it can do exactly what you're after without an extension. You can use the developer tools to explore the HTML to see if it is what you expect/intend, but I don't think it will tell you where there are errors.
HTML browsers are designed to be able to taken invalid markup and render it as best they can. It will have a very high tolerance for errors.
You may want to try an extension like one of these.
There is a new HTML5 validator for based on libTidy (same as the firefox version)
https://chrome.google.com/webstore/detail/anjdemaoejlpgmnmkijdemoiebcddhkc
I prefer Validity as it shows errors in the devtools console. It also lets you set up a list of hostnames where it should run on each page load which has been super useful for me during development.