Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1054.Advanced search and replace -- How to add title attribute for all images in html files automatically?

User: Rod Smith -- 2013-02-17          << 1053  1055 >>
Hits: 1480
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
search a batch of html pages for images with an alt attribute but no title attribute, add the title attribute using the same alt attribut text contents.
Input Sample:
<img src="anyoldimage.jpg" alt="A Good Image">
Output Sample:
<img src="good image.jpg" alt="A Good Image" title="A Good Image">
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. open "Tools->Batch Runner" menu
2. drag multiple html files from windows file browser and drop to "Batch Runner" window
3. click "Fast Replace" button to open "Fast Replace" window
4. click "Add" to add new replace rules
* set "search" to:

* set "replace" to:

* click "ok"
5. make sure "reg exp" and "cross line" options are checked
6. click "start", done.

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to add alt attribute for all img tags in html files automatically? (92%)
How to add title attribute for all links automatically in TXT file? (75%)
How to make html tags for image file list automatically? (61%)
How to extract tables from html files into csv file automatically? (60%)
How to find the 5 largest number from a text file automatically? (59%)
How to extract all image links from a html file? (59%)
How to detect encoding type of a text file automatically? (59%)
How to calculate the area of triangles base on 3 sides automatically? (58%)

Check Demo of Advanced search and replace
Keywords:
alt attribute  attribute  images  alt  img  contents  image  pages  add title  automatically  add attribute to all images html  batch search file contents  replace text in multiple files using batch  search and replace images batch  batch replace contents  html title replace multiple  html title from text file  make all files same text