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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T19:41:45+00:00 2026-05-18T19:41:45+00:00

I have a html page in which following master reset css is included. I’ll

  • 0

I have a html page in which following master reset css is included. I’ll be getting html code as a string in java, from which i have to remove/replace/comment following css code using java. I have to exclude other inline css styles while removing/replacing below css. I tried using StringUtils class, but its not working. How i can do this in java?

<style type="text/css"> 
    @charset "utf-8";
    /* CSS Document */
    /* Ver 1.0 Author*/
    /* master reset */
    a,abbr,acronym,address,applet,b,big,blockquote,body,button,caption,center,cite,code,dd,del,dfn,
    dir,div,dl,dt,em,embed,fieldset,font,form,frame,h1,h2,h3,h4,h5,h6,hr,html,i,iframe,img,input,
    ins,kbd,label,legend,li,menu,object,ol,option,p,pre,q,s,samp,select,small,span,strike,strong,
    sub,sup,table,tbody,td,textarea,tfoot,th,thead,tr,tt,u,ul,var
    {background:transparent;border:0;font-family:inherit;font-size:100%;font-style:inherit;
    font-weight:inherit;margin:0;outline:0;padding:0;vertical-align:baseline;}

    html {font-size:1em;overflow-y:scroll;}
    body {background:white;color:black;line-height:1;}

    a,ins {text-decoration:none;}
    blockquote,q{quotes:none;quotes:"" "";}
    blockquote:before,blockquote:after,q:before,q:after {content:"";content:none;}
    caption,center,td,th {text-align:left;}
    del {text-decoration:line-through;}
    dir,menu,ol,ul {list-style:none;}
    table {border-collapse:collapse;border-spacing:0;}
    textarea {overflow-y:auto;}
</style>
  • 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-18T19:41:45+00:00Added an answer on May 18, 2026 at 7:41 pm

    I’d recommend using an HTML parsing library such as JSoup to do this.

    With JSoup, you can select certain elements (based on their tagname, id etc) using a selector. For example, to remove all the style elements:

    Document doc = Jsoup.parse(html);
    Elements els = doc.select("style");
    for(Element e: els){
        e.remove();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following markup inside a master page <html xmlns=http://www.w3.org/1999/xhtml > <head runat=server>
I have a master page which I am using as a template to allow
I have this html page which globally exists of div , section , and
I have the following code which enables a button when the checkbox is checked.
I have an HTML page where I want to change Image & Link with
Please see the the following http://valogiannis.com/recent/ .I have a webpage and when user click
I am absolutely new to the Android platform and have been building an application
1) I have a Drupal site located at http://example.com and I have a directory
Often a user will misuse a Rich Internet Application, and attempt to use the
I'm writing this in the forlorn hope that someone has already done something similar.

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.