Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8139847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:57:46+00:00 2026-06-06T11:57:46+00:00

I have always and will continue to always close an HTML input such as

  • 0

I have always and will continue to always close an HTML input such as

<input type=text />

instead of the non-XHTML way

<input type=text>

But my question is, will either way have any foreseeable problems i.e. cross-browser, mobile device, etc? I’ve just now noticed that the framework I use generates inputs without a closing tag and I hate have differences between my code and theirs. It’s really annoying and ugly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T11:57:48+00:00Added an answer on June 6, 2026 at 11:57 am

    Personally, I’ve never seen a cross-browser problem on account of closing an empty tag in an HTML document.

    However, according to Refactoring HTML, older browsers such as Netscape 3 will not parse empty elements properly.

    This is because in SGML and some HTML4 parsers, there was support for a syntax “NET” which is similar to the empty tag syntax: (quoted from XHTML Considered Harmful)

    The “/>” empty tag syntax actually has totally different meaning in
    HTML4. (It’s the SHORTTAG minimisation feature known as NET, if I
    recall the name correctly.) Specifically, the XHTML

    <p> Hello <br /> World </p>
    

    …is, if interpreted as HTML4, exactly equivalent to:

    <p> Hello <br>&gt; World </p>
    

    …and should really be rendered as:

    Hello
    > World
    

    So, if you’re using a HTML4 <!DOCTYPE> and targetting Netscape 3, don’t do it! But if you’re using HTML5 (or XHTML) there’s no harm in closing your empty tags – as a matter of fact in XHTML you have to, or Tim Bray will kill a puppy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strong type view of type List<List<MyViewModelClass>> The outer list will always
I need to have ALWAYS a background service that will synchronize my Android application
I have a WPF application that will always run on windows 7, it opens
I have a table called pollData. It will always contain only 1 row. It
I have a CSV file. The first row will always contain column headers. Depending
Say you have a variable called hotelPropertyNumber . The contents will always be a
I have java sdk 1.7. I've always used django/python for web development, this will
I always thought that replacing the <center> tag with <div style=text-align:center;> will get me
I have a class which i realized will not always correctly instantiate and as
I have always thought that in order to connect to SQL server using windows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.