We help IT Professionals succeed at work.

How create highlight html files from regular html file .

abohamad
abohamad asked
on
261 Views
Last Modified: 2014-05-16
I have many html files and I want create copy of them after highlight some text I search about them . (huge number of html files can’t create manually )

How create highlight html files from regular html file .
Comment
Watch Question

Edwin HofferTechnical Expert
Top Expert 2014

Commented:
Hello abohamad,

Use <span style="background-color:blue;">This is a Span.</span>, by this you can change background color of the text.

Hope my answer can help you. If you need any other help you can reply.

Thanks
Edwin
Java&Guidewire Senior Developer
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
I want use jsoup  for edit all html file

example html file
<html>
 <head></head>
 <body> 
  <div class="content" style="margin-left:10px;"> 
   <ul style="list-style-type: disc;"> 
    <li><span>obj: blue</span></li> 
    <li><span>descr: red</span></li> 
    <li><span>double: yellow</span></li> 
   </ul> 
  </div> 
 </body>
</html>

Open in new window


tha result result i wanted
<html>
 <head></head>
 <body> 
  <div class="content" style="margin-left:10px;"> 
   <ul style="list-style-type: disc;"> 
    <li><span>obj: <span style=\"background-color:red;\">blue</span></span></li> 
    <li><span>descr:<span style=\"background-color:red;\"> red</span></span></li> 
    <li><span>double: <span style=\"background-color:red;\">yellow</span></span></li> 
   </ul> 
  </div> 
 </body>
</html>

Open in new window

Edwin HofferTechnical Expert
Top Expert 2014

Commented:
Hello abohamad,

You can change your text background through only css, you can use css by Linking, Embedding  and Inline CSS to HTML tags.

JavaScript is only to add effects in the page.

You can use class in div tags.

Example:

HTML Code:
<div class="background-red">
Add Content Here
</div>

Open in new window



CSS Code:

.background-red{
	background-color:red;
}

Open in new window


Or you can add it by span:

Example:

<span style="background-color:red;">Text Here</span>

Open in new window


Thanks
Edwin
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.