Thread: regex question
View Single Post
Old 11-21-2014, 09:54 AM   #7
Paulie_D
Connoisseur
Paulie_D began at the beginning.
 
Paulie_D's Avatar
 
Posts: 67
Karma: 10
Join Date: Apr 2011
Device: Kindle 3, Samsung Tab 4
Quote:
Originally Posted by DrChiper View Post
Indeed! Although not very common, constructs like this do happen:

Code:
  <h1 class="center"><a href="Section003.xhtml#start">Test</a><br/>

  Some sub header</h1>
As a 'coder'of sorts, (primarily web) I would tell anyone that using the break tag for spacing is poor practise.

I'm not saying it doesn't have it's place but using it for spacing is not recommended. That's what margins/padding are for.

This

Code:
  <h1 class="center"><a href="Section003.xhtml#start">Test</a><br/>

  Some sub header</h1>
Should be replaced with this

Code:
  <h1 class="center"><a href="Section003.xhtml#start">Test</a></h1>

  <h2 class="center">Some sub header</h2>
It's certainly more semantic.

Whether this has an specific relevance to e-publishing is perhaps questionable but 'poor' code is something to be noted even if we choose to use it for own own reasons.

Understand I'm not running anyone down for it...just expressing one man's opinion.
Paulie_D is offline   Reply With Quote