Are End Tags Necessary in HTML?
This was a question that I was asked by someone in one of my HTML classes. I thought it might help someone else as well.
Question: Is the </p> necessary.
Answer: It depends on what you are doing.
eBay’s editor tends to either ignore certain tags or just not care whether the ending tags are there or not. Either eBay’s editor tries to help you out by adding the ending tags for you, or they just ignore them altogether. I’m not sure which.
All browsers are written a little differently and handle your HTML code a little differently. BUT, there is an HTML standard - a set of rules that define HTML - and most browsers stick to this standard. Many browsers are more lenient about the rules and don’t require the ending tags. But, other browsers may require the ending tags.
If you are building a website that could possibly be visited by anyone from anywhere using any kind of browser, then you want to make sure that you stick as close as possible to the rules so that ALL browsers will work as you expect when you write the code. If you leave off an ending tag and the users browser expects an ending tag, your web page could end up looking really strange.
So, for eBay, it probably doesn’t matter right now. Later, if eBay changes it’s editor, it may become an issue. For websites, I always recommend that you stick as close to the rules as possible. Not only because of different browsers accessing your sites, but because of the search engines that visit your sites as well. Google is a stickler for obeying the rules and whether or not your site has correct HTML code may be a big factor in how well your site ranks for your chosen keywords.
You can find the standards website here:
http://www.w3.org