Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HTML5 - leave out (some) end tags

12 views
Skip to first unread message

Robert Prins

unread,
Dec 6, 2017, 7:15:54 PM12/6/17
to
It's allowed to leave out a few end tags in tables (like </th>, </td>, and
</tr>) which would potentially make pages smaller. What's the general opinion on
this?

- go for it?
- use, but with caution?
- bad, it will break things?

Robert
--
Robert AH Prins
robert(a)prino(d)org

Good Guy

unread,
Dec 6, 2017, 8:22:22 PM12/6/17
to
On 07/12/2017 01:17, Robert Prins wrote:
It's allowed to leave out a few end tags in tables (like </th>, </td>, and </tr>) which would potentially make pages smaller. What's the general opinion on this?

- go for it?
- use, but with caution?
- bad, it will break things?

Robert

It doesn't matter.  In fact you don't need any tags at all to create a web page.  Just a plain text file will work.  You need tags and CSS to style the page but just for fun you can create a text file and browse it in any of the browsers currently available.

Aren't you using any top notch Text Editors to create your webpage?  For example I use VS Code and it has auto-complete that closes all the tags for me in accordance with HTML5 rules.  You don't need to remember anything but it helps if you know something!!

VS Code is one editor but there are others like Brackets, Atom, Notepad++ etc.  All you need is an extension called Emmet and it works wonders!!!  VS code has already got Emmet but in other editors you need to install it.



--
With over 600 million devices now running Windows 10, customer satisfaction is higher than any previous version of windows.

Thomas 'PointedEars' Lahn

unread,
Dec 6, 2017, 10:21:21 PM12/6/17
to
Robert Prins wrote:

> It's allowed to leave out a few end tags in tables (like </th>, </td>, and
> </tr>) which would potentially make pages smaller.

There are no "pages".

> What's the general opinion on this?

None.

> - go for it?
> - use, but with caution?

Depends.

> - bad, it will break things?

Unlikely.

Next time, ask a *smart* question.


PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee

David E. Ross

unread,
Dec 6, 2017, 11:16:42 PM12/6/17
to
On 12/6/2017 5:17 PM, Robert Prins wrote:
> It's allowed to leave out a few end tags in tables (like </th>, </td>, and
> </tr>) which would potentially make pages smaller. What's the general opinion on
> this?
>
> - go for it?
> - use, but with caution?
> - bad, it will break things?
>
> Robert
>

First of all, PointedEars' complaint is that you use "page" when I think
you mean "file". Omitting an optional end tag will not reduce the size
of the rendered Web page, but it will reduce the size of the HTML file.

Whether or not you use an optional end tag depends on what follows the
element specified by its beginning tag. Call the element in question A
and the following element B. If B is an element that can be embedded in
element A and alternatively can be outside of A, then you must omit A's
end tag if you intend to embed B; and you must specify A's end tab if
you do not intend to embed B.

All this is something you need to test with the W3C validator. You must
also view the results with at least two unrelated browsers.

--
David E. Ross
<http://www.rossde.com/>

President Trump: Please stop using Twitter. We need
to hear your voice and see you talking. We need to know
when your message is really your own and not your attorney's.

Thomas 'PointedEars' Lahn

unread,
Dec 7, 2017, 10:10:20 PM12/7/17
to
Robert Prins wrote:

> It's allowed to leave out a few end tags in tables (like </th>, </td>, and
> </tr>) which would potentially make pages smaller. What's the general
> opinion on this?
>
> - go for it?
> - use, but with caution?
> - bad, it will break things?

The beginner asks for the best path;
the apprentice asks how to walk the path;
the master walks the path, using good judgment on the way.


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann

Mr. Man-wai Chang

unread,
Dec 8, 2017, 1:11:04 AM12/8/17
to
On 12/7/2017 9:17 AM, Robert Prins wrote:
> It's allowed to leave out a few end tags in tables (like </th>, </td>,
> and </tr>) which would potentially make pages smaller. What's the
> general opinion on this?
>
> - go for it?
> - use, but with caution?
> - bad, it will break things?
>
> Robert

To avoid troubles, always close your HTML tags properly if they are
supposed to come as pairs, as in WordStar! ;)

--
@~@ Remain silent! Drink, Blink, Stretch! Live long and prosper!!
/ v \ Simplicity is Beauty!
/( _ )\ May the Force and farces be with you!
^ ^ (x86_64 Ubuntu 9.10) Linux 2.6.39.3
不借貸! 不詐騙! 不援交! 不打交! 不打劫! 不自殺! 請考慮綜援 (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa
0 new messages