Karakas Online

5.15.1. Labels as filenames

You should always put a label after the chapter/section/subsection/subsubsection title (from the LyX menu: Insert-->Label). The text you use for the label will become the name of the HTML file that contains that chapter/section etc. See Section 7.1.5 for the code that controls this setting in the stylesheets (it is the use-id-as-filename DSSSL parameter. that does this).

Tip SEO (Search Engine Optimization) tips
 

There is circumstancial evidence that the search engines (especially Google) weigh substantially the keywords that appear between <H1>, <H2>, <H3> tags (that's the chapter's and sections' titles) especially if they also appear as part of the HTML filename. You are thus well advised to follow some simple rules for your titles (er...filenameswink):

  • Always create a label. Failing to do so, will produce and automatic, nothing-saying filename. You loose a potential (although small) ranking boost from the search engines, if your section is about, say, blue widgets, but is called x543.html, instead of blue-widgets.html.

  • The label should contain the same text as the title. The title you enter in LyX will automatically be the HTML title in the header part of the resulting HTML file (this is a meta-information, not visible to you, but very well visible to the search engines), as well as the title inside the <H1>, <H2>, or <H3> tag that is produced in the HTML body automatically as well. If the label is similar to the title, then the HTML filename will be similar to the titles (meta-title and actual text title) of the text inside it. This wil be rewarded with more weight in the search engine ranking, resulting in a higher place in the SERPS (Search Engine Result Pages). And believe me, even if you hate search engines, it is much easier to find a chapter by reading "talking" filenames, like blue-widgets.html, than cryptic ones like x543.html!

  • Dont'use blanks. Use hyphen “-” instead. This makes use of the fact that for most search engines “-” is equivalent to a blank. This is not the case for underscore “_”.

  • Don't use illegal characters, i.e. characters that are not allowed in HTML filenames.

Last updated Mon Sep 24 01:19:25 CEST 2007 Permalink: http://www.karakas-online.de/mySGML/labels-as-filenames.html All contents © 2002-2007 Chris Karakas