• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

needless inline styles and span tags

Explorer ,
Jul 27, 2007 Jul 27, 2007

Copy link to clipboard

Copied

OS: Win XP SP 2
Product: RoboHelp HTML 6
Output: WebHelp

I am finding some instances of needless inline styles and span tags in some topics in a project. Around these problematic instances are plenty of instances that have no problem. I used non-problematic instances as guides for correcting the problematic instances. Fortunately, RH hasn't overwritten any of my corrections.

I am concerned about the insertion of needless inline styles and span tags at two levels. First, I see them as indicators of inconsistency. Whether the inconsistency is in myself or in RH, I don't know (but I want to eliminate it). Second, needless code is wasteful (esp., wastes time in code view).

Has anybody seen this before? Does anyone know or suspect a cause?

SAMPLE 1
RH6 created: <p><span><span style="font-weight: normal;">blah blah yaddi yaddi</span></span></p>
I corrected: <p>blah blah yaddi yaddi</p>

SAMPLE 2
RH6 created: <p style="font-weight: normal;"><span style="font-weight: normal;">blah blah yaddi yaddi</span></p>
I corrected: <p>blah blah yaddi yaddi</p>

SAMPLE 3
RH6 created: <p style="font-weight: bold;"><span style="font-weight: bold;">blah blah yaddi yaddi</span></p>
I corrected: <p style="font-weight: bold;"><>blah blah yaddi yaddi</p>

Views

615

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 27, 2007 Jul 27, 2007

Copy link to clipboard

Copied

Yes all seen before. We believe there will be a lot of improvement in the next release.

Re sample 3, Dreamweaver would write that as below.

<p><b>blah blah yaddi yaddi</b></p>

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jul 30, 2007 Jul 30, 2007

Copy link to clipboard

Copied

Some of this has to do with how users have applied styles in WYSIWYG mode; for example, if you double click a word (which selects the space after) and apply Bold, then later select the word by dragging the cursor to select only the word (which doesn't select the space after), RH will usually surround the selected characters with "normal" span tags and often leave the bold in place.

This same type of style formatting might have been repeatedly done in the original form that might have been imported (Word, Frame, etc.). So, then, if you compound the code bloat from an imported file with additional formatting in RH, well you do the math.

I've seen code wherein a six-word sentence might be saddled with as many as 10-12 SPAN tags and might stretch into 6-7 lines of code!

However, these are still flat files, not binary; you'd need a ton of extra code to increase the aggregate file size a lot. Heck, your graphics will usually take more room than your topics. One of our child projects has 153 .htm files at 3.25 MB, whereas the aggregate of .gif, .jpg, and .bmp graphics exceed 4 MB. My view has always been this: until the underlying code affects the format I expect to see in my output, I consider extra SPAN and KADOV tags to be nothing but white noise.


Good luck,
Leon

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 30, 2007 Jul 30, 2007

Copy link to clipboard

Copied

I don't have anything to add to the diagnostic advice, but have a couple of notes on treatment.

- If you have a lot of files to clean up, you may want to look into an automated solution. I've been very happy with HTML Tidy ( http://tidy.sourceforge.net/).

- Keeping your HTML under version control (and requiring that authors only check in cleaned HTML, if you have automated cleaning set up) can save a lot of hair-tearing when weirdness suddenly shows up.

- If you don't like RH-flavored HTML (I don't), do all your authoring outside RH and just use RH for creating the index and TOC and stitching the whole thing together.

A

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 30, 2007 Jul 30, 2007

Copy link to clipboard

Copied

I have to add a brava to AmyGfromNZ. I use Dreamweaver and CSS for all of my editing and haven't edited a page in RH for the last 5 years. Browser problems are definitely minimized.

Andrea

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 31, 2007 Jul 31, 2007

Copy link to clipboard

Copied

LATEST
Also, identifying and removing unnecessary tags may be enhanced by showing the tag list from the view menu. This allows you to not have to work directly in the true code view.
Chris

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp