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 7074361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:02:50+00:00 2026-05-28T06:02:50+00:00

Question : If I close any html tag in this fashion (Including the id

  • 0

Question: If I close any html tag in this fashion (Including the id property):

<div id="tagid" >...more html
...
</div id="tagid" >

Will it affect the page, or won’t like it, or disrupt any W3C rules…how can I put it…will it affect in any way?

Why?: Simply personal preference.
Instead of writing additional comments next to the tag, I simply add the id to help me know WHAT tag is closed -The tag is closed any way, so I guess it won’t do anything (or so I think)

PS. FYI, I am a beginner

  • 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-05-28T06:02:51+00:00Added an answer on May 28, 2026 at 6:02 am

    No this is not valid.

    While it might not break your code, it could!

    You should just use the comments

    </div> <!-- closing main content div -->


    After checking, this

    <div></div id="tagid" >

    breaks in the validator

    http://validator.w3.org/#validate_by_input


    Although not specifically mentioned as illegal, the HTML spec only mentions attributes as appearing within the start tag:

    Elements may have associated properties, called attributes, which may
    have values (by default, or set by authors or scripts).
    Attribute/value pairs appear before the final “>” of an element’s
    start tag. Any number of (legal) attribute value pairs, separated by
    spaces, may appear in an element’s start tag.

    http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.2

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

Sidebar

Related Questions

This is a very small HTML question that I am sure you guys will
If this is not a real question then feel free to close ;)
Duplicate of this question. Vote to close. Consider this at the windows commandline. scriptA.py
Have been working on this question for a couple hours and have come close
I haven't found this question, feel free to close if it's already up here.
Easy question, it is valid to have overlapping spans in html? Example: <span id=1>This
This is a follow on question from Display and interact with an HTML form
Question: Any ideas how to NOT trigger the confirmOption function on page load, and
I know from reading this Stackoverflow question that the complier will look at your
I've got html that looks something like this: <div id=sortThis> <div id=1>Price:<span class=price>20</span><span class=style>blue</span></div>

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.