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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:09:27+00:00 2026-06-14T17:09:27+00:00

Sorry, this may be kind of weird problem: I have an existing HTML code,

  • 0

Sorry, this may be kind of weird problem:

I have an existing HTML code, which I can not directly edit or delete parts of it. The problem is: Inside a div-element in this code, there is some text which I want to hide. There are also another element inside of this div, which I don’t want to hide. It looks something like this:

<div>
....Text I want to hide....
<table> ... Text I don't want to hide...</table>
</div>

My question: Is it possible to hide the “….Text I want to hide….” while not hiding the “… Text I don’t want to hide…”? (for example using javascript?)

  • 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-14T17:09:28+00:00Added an answer on June 14, 2026 at 5:09 pm

    If you want to remove the text, you can write:

    div.removeChild(div.firstChild);
    

    (where div is a variable referring to this <div> element).

    If you want to wrap it in a <span> that you can then hide and unhide at will, you can write:

    var span = document.createElement('span');
    div.insertBefore(span, div.firstChild);
    span.appendChild(div.firstChild);
    

    (where div is as before).

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

Sidebar

Related Questions

Sorry, this may or may not be a programming question directly, but I am
This may look like a trivial problem. Sorry in that case, I am not
Sorry this may be blatantly obvious but I have spent all morning trying to
I'm sorry this may seem a bit basic, but I can't get my head
This may have been asked before, so I'm sorry if this is repeated. If
Sorry if this question may be simple, but I can't seem to find an
Sorry for this, may be this is very basic question, I have multiple small
This may not be explained the best but here it goes. I have a
Sorry, this is quite a special topic so this may not be of interest
Before I start this may be hard for some people to understand. Sorry. I

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.