I've been editing a lot of HTML pages with basic text editor, notepad. When I went to validate them the validation service is saying theres a div
tag that is not closed. I tend to find automatic error reports such as these dont tend to be too reliable, i.e they will give you a line number and the error but often times the error is actually in another part of the file entirely.
I'm just wondering if there are any free lightweight html editors that have the functionality of finding the closing tag for a tag. For example, you click on a tag then click a shortcut, and the program will jump to the closing tag, I know this functionality is in homesite, but i dont have homesite, and its a bit of a bulky program anyway.
Or even better any online html validation services that can highlight unclosed tags?
To sum up, I would like to know how to find html tags that don't have closing tags - is there a free html editor or simple online service that can help with this?
You can use the Auto-Format feature (Ctrl+K+D) of Microsoft Visual Studio - it reformats your code so that you can easily see whether there are missing tags. I love this feature, it often comes in handy. Save this answer. Show activity on this post.
An HTML tag is a special word or letter surrounded by angle brackets, < and >. You use tags to create HTML elements , such as paragraphs or links. Many elements have an opening tag and a closing tag — for example, a p (paragraph) element has a <p> tag, followed by the paragraph text, followed by a closing </p> tag.
An opening tag begins a section of page content, and a closing tag ends it. For example, to markup a section of text as a paragraph, you would open the paragraph with an opening paragraph tag <p> and close it with a closing paragraph tag </p> (closing tags always proceed the element with a /).
If you save your HTML as page.xhtml
(instead of page.html
), the browser (Firefox/Chrome or Opera) should find the un-closed tags for you without the need for a validator. Just remember to rename them .html
before serving them online - IE doesn't support .xhtml
files yet.
Edit (3 years later): This post's still getting comments/upvotes so a slight amendment. IE9 and IE10 do now support xhtml files.
Use the firefox view source - wrong code will be in different color
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With