| 
			
			 | 
		#1 | 
| 
			
			
			
			 Bookmaker 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 434 
				Karma: 2143650 
				Join Date: Sep 2010 
				
				
				
				Device: Cybook Opus 
				
				
				 | 
	
	
	
		
		
			
			 
				
				Replacing All Tags Of One Kind With Another
			 
			
			
			I've gotten into the habit of using <span class="bold"> for bold text because someone told me a long time ago that <b> was deprecated. It's lately become clear to me that this was incorrect and I should probably be using <strong>. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Is there a way to replace every instance of that particular <span> tag in an ePub, including the closing tag with a <strong> tag, other than doing it all manually?  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | |
| 
			
			
			
			 Bibliophagist 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 48,175 
				Karma: 174315444 
				Join Date: Jul 2010 
				Location: Vancouver 
				
				
				Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Find: <span class="bold">(.*?)</span> Replace: <strong>\1</strong> might work for you. Backup your file and test a couple of find/replace before doing a replace all. Note that this uses the PCRE flavour used with Sigil. Others may vary and you may need to remove the ? if the default is lazy (minimal match). Last edited by DNSB; 10-02-2020 at 07:50 PM.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#3 | ||
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,784 
				Karma: 150249619 
				Join Date: Nov 2006 
				Location: Roslindale, Massachusetts 
				
				
				Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Quote: 
	
  | 
||
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Running with scissors 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,592 
				Karma: 14328510 
				Join Date: Nov 2019 
				
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			If you're using Sigil you can use its TagMechanic plugin, which is essentially the same as the Editing Toolbag that JSWolf pointed to. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	I'd forgotten about the strong tag; google brought up this article: https://www.seobility.net/en/wiki/Strong_and_Bold_Tags So you could use strong for things you want to semantically emphasize and style it as bold in your css. In fiction my experience is that when people emphasize something said it's with italics. So now I'm confused about the difference between the strong and em tags.  
		 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | ||
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,784 
				Karma: 150249619 
				Join Date: Nov 2006 
				Location: Roslindale, Massachusetts 
				
				
				Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 In that article, it states... Quote: 
	
  | 
||
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#6 | ||
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,842 
				Karma: 105494725 
				Join Date: Apr 2011 
				
				
				
				Device: pb360 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 https://en.wikipedia.org/wiki/Deprecation It means that it is obsolete and should not be used is in new code and will likely not be supported at some possibly unspecified future time. It has nothing to do with whether it works now. Quote: 
	
 Is it because you are an European?  | 
||
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 Running with scissors 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,592 
				Karma: 14328510 
				Join Date: Nov 2019 
				
				
				
				Device: none 
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#8 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,842 
				Karma: 105494725 
				Join Date: Apr 2011 
				
				
				
				Device: pb360 
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#9 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905 
				Karma: 47303824 
				Join Date: Jul 2011 
				Location: Sydney, Australia 
				
				
				Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 It is about semantics. It is about letting applications such as a TTS handle them differently if it makes sense. And honestly, if the TTS isn't indicating a difference, then it is probably because far to many people who code the books have listened to you. There are semantics involved. We should be expressing them where we can. Then the software can start handling things accordingly. @Rand Brittain: Use whichever you feel comfortable with. I personally don't like seeing <span class="bold">, but if it was <span class="telepathicSpeach"> and the class telepathicSpeach only set the style to bold text, it would make sense to me (though most people seem to use italics for that). That makes it easy to go back and restyle it later. And if <strong> makes more sense to you than <b> when you are reading the code, then do it that way. Or if <b> feels better to you, use it.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#10 | |
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,784 
				Karma: 150249619 
				Join Date: Nov 2006 
				Location: Roslindale, Massachusetts 
				
				
				Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Prove I'm worog and I'll agree to use <strong> and <em>. Prove to me that you can tell by reading if the text is using <b> or <strong>.  | 
|
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#11 | |
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,784 
				Karma: 150249619 
				Join Date: Nov 2006 
				Location: Roslindale, Massachusetts 
				
				
				Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 I have not see a single eBook where <strong> was used correctly.Same with <em>. It's either all <b> or <strong> / <i> or <em>. Also, I've never heard of any TTS that read <strong> or <em> any differemt then <b> or <i>. In most cases, the TTS just reads the text the same as it does without any style. Last edited by JSWolf; 10-03-2020 at 07:35 AM.  | 
|
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#12 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905 
				Karma: 47303824 
				Join Date: Jul 2011 
				Location: Sydney, Australia 
				
				
				Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 It's about recording the semantics so that they can be used later. Even if it is just so that the author/book creator can change something later.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#13 | |
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,784 
				Karma: 150249619 
				Join Date: Nov 2006 
				Location: Roslindale, Massachusetts 
				
				
				Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  | 
|
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#14 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905 
				Karma: 47303824 
				Join Date: Jul 2011 
				Location: Sydney, Australia 
				
				
				Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 The question was "how do I do something", not "should I do something". Everything else in this thread is off topic.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#15 | |
| 
			
			
			
			 Still reading 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 15,008 
				Karma: 111111255 
				Join Date: Jun 2017 
				Location: Ireland 
				
				
				Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 It's alleged than some screen readers differentiate between <b> and <strong>, though mine don't! It's likely you can just search and replace if you feel you need to change it. Note that while ebooks use HTML and CSS largely the same way as web pages, they are not web pages. Also a Chapter Heading might not be using <strong> or <b> but an H class. Probably shouldn't be using <b> or <strong> directly. Arguably only a word or phrase inline in a styled (via CSS) paragraph would directly have <b>, <i> and the semantic alternatives. Last edited by Quoth; 10-03-2020 at 12:31 PM. Reason: Headings  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
            
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Problem replacing tags in custom recipe | Phoebus | Recipes | 2 | 07-05-2016 11:22 AM | 
| Replacing code without replacing text? | ElMiko | Sigil | 6 | 11-30-2011 09:14 PM | 
| Amazon Tags - Popular tags vs Unique tags. | chrisanthropic | Writers' Corner | 6 | 09-20-2011 12:18 AM | 
| Replacing multiple tags over 2 lines | kmckinley | Sigil | 7 | 09-03-2011 11:34 PM | 
| Replacing tags after using them | hiperlink | Recipes | 2 | 03-28-2011 11:23 AM |