# Optional Closing Tags in HTML

**URL:** <https://forum.kirupa.com/t/optional-closing-tags-in-html/262257>\
**Category:** Uncategorized\
**Created:** [June 4, 2008, 1:25pm UTC](https://forum.kirupa.com/t/optional-closing-tags-in-html/262257 "2008-06-04T13:25:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tecktalk](https://avatars.discourse-cdn.com/v4/letter/t/74df32/32.png) [@tecktalk](https://forum.kirupa.com/u/tecktalk)\
**Post date:** [June 4, 2008, 1:25pm UTC](https://forum.kirupa.com/t/optional-closing-tags-in-html/262257/1 "2008-06-04T13:25:25Z")

</div>

For as long as I’ve been validating web pages, I never realized that the closing \</head\> tag was optional in HTML. I feel as if I’ve missed the boat at times.  
While I’m all for trimming excess code, I just cannot for the life of me strip out closing tags because they are optional in HTML. I’d be concerned that something, somewhere would not parse the document correctly if I removed the closing \</head\> element.  
Are my concerns unfounded?

---

<div class="post-metadata">

**Author:** ![djheru](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/djheru/32/3190_2.png) [@djheru](https://forum.kirupa.com/u/djheru)\
**Post date:** [June 4, 2008, 3:10pm UTC](https://forum.kirupa.com/t/optional-closing-tags-in-html/262257/2 "2008-06-04T15:10:09Z")

</div>

I think that all tags must be closed. Even “self closing” tags must close, i.e. \<br /\>

Who told you that the closing head tag was optional?

edit: I see you are talking about HTML 4, not XHTML

---

<div class="post-metadata">

**Author:** ![fasterthanlight](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@fasterthanlight](https://forum.kirupa.com/u/fasterthanlight)\
**Post date:** [June 4, 2008, 6:07pm UTC](https://forum.kirupa.com/t/optional-closing-tags-in-html/262257/3 "2008-06-04T18:07:22Z")

</div>

meh… whats the point, XHTML doesn’t like it, and it only really saves you one word

---

<div class="post-metadata">

**Author:** ![redelite](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@redelite](https://forum.kirupa.com/u/redelite)\
**Post date:** [June 4, 2008, 6:42pm UTC](https://forum.kirupa.com/t/optional-closing-tags-in-html/262257/4 "2008-06-04T18:42:02Z")

</div>

:lol:… I would close everything just for consistency, including self-closing tags \<input /\> (plus it looks prettier when its tabbed out correctly :P).

And you’re guaranteed that a closing tag isn’t an issue if you have a browser render problem. :thumb2:
