W3C home > Mailing lists > Public > www-validator@w3.org > October 2022

Self closing tags

From: Robin Lucas <robin.lucas@tiscali.co.uk>
Date: Tue, 4 Oct 2022 23:26:09 +0100
To: www-validator@w3.org
Message-ID: <1f6cc858-5142-13fa-e0fe-0eb72160ba05@tiscali.co.uk>
The code checker issues WARNINGS:-

"Self-closing tag syntax in text/html documents is widely discouraged; 
it’s unnecessary and interacts badly with other HTML features (e.g., 
unquoted attribute values). If you’re using a tool that injects 
self-closing tag syntax into all void elements, without any option to 
prevent it from doing so, then consider switching to a different tool."

The statements in my source code have NO CLOSING tags,

<input type="text"
        readonly="readonly"
        style="color: #000000; background-color: #ff9999;"
        name="mycall"
        value=<?php echo $user; ?>
        size="15"
        maxlength="12">

AND

<input type="text"
        readonly="readonly"
        style="color: #000000; background-color: #ff9999;"
        name="dxcall"
        value="<?php echo $beaconcall; ?>"
        size="15"
        maxlength="12">

BUT

the code checker shows closing tags and then complains. The code checker 
itself must be putting them there! Please explain why this is happening.

The code is here:

https://www.beaconspot.uk/dxcform.php


Thanks,
Robin Lucas
Received on Wednesday, 5 October 2022 08:46:21 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 5 October 2022 08:46:22 UTC