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

  • Home
  • SEARCH
  • 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 6204425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:05:22+00:00 2026-05-24T05:05:22+00:00

Why is it that if I do: <div> aaaaaaaa <b></div> <div> bbbbbbbb </div> <div>

  • 0

Why is it that if I do:

<div> aaaaaaaa <b></div>
<div> bbbbbbbb </div>
<div> </b> ccccccccc </div>

…the content “bbbbbbbb” is in bold? Then why can’t I do the same with another tag such as <span> instead of <b>? Is the bold case just the browser trying to fix it or is it actually valid?

I am attemping to hide some text content that could span several <div> tags but only know where the text starts and ends. Could I use a tag such as <b> to do this (with css stylin)? Or is it a really bad idea?

Do you have any other suggestions?

Edit: I cannot easily change the HTML so validation is not useful. The HTML is user generated.

  • 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-24T05:05:23+00:00Added an answer on May 24, 2026 at 5:05 am

    It isn’t allowed. It is just the browser trying to perform error recovery.

    Elements must be arranged in a tree structure. Each element has a single parent element (root node excepted).

    Given the above input, Chrome will generate this:

    <div> aaaaaaaa <b></b></div><b>
    <div> bbbbbbbb </div>
    </b><div><b> </b> ccccccccc </div>
    

    You should not depend on this type of error recovery. Always remember to validate.

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

Sidebar

Related Questions

I have a css div and within that div another div exists. How can
I have code that uses jquery.slideup and jquery.slidedown How can i know that div
There is a div that has inner content, a div with a border that's
I just want that horizontal div (about 50 pixels tall) that span across the
I have a div with id kGrowl and inside that div I have another
I am trying to make an AJAX request that updates a div's content when
I have a website that uses ajax jquery and colorbox. Inside the div #content
I have a div that can display 3 images (in the background) each indicating
I've got my site content inside an 800px-wide div, I'd like that div to
I have a CONTENTEDITABLE div and inside that div I have a CONTENTEDITABLE span,

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.