Top Nav

Your how-to site for community journalism

Slugs

A slug is the name of a story or article in the publishing business. Organized naming structures help you with better search engine rankings. Using incorrect characters can throw your server for a loop.

There is no difference between .htm and .html files, but you will have an easier time if you select one extension and stick with it because your computer may separate the items within a folder based on file extension and group all files saved as .htm apart from files saved as .html.

Follow these basic rules for naming your files:

  • Use an .html or .htm file extension on all of your HTML files.
  • Never use spaces in your file names. They make it harder for users to type and follow URLs once your pages are uploaded to your website.
  • Never use “special” punctuation in your file names; this includes the following characters:
    ` ~ ! @ # $ % ^ & * ( ) + = , / ? ’ ” ” : ; < >
  • You may use underscores, hyphens and periods in your file names.
  • File names are case sensitive – they know the difference between upper and lowercase letters. Pick a naming scheme and stick with it to minimize later confusion. Many web designers use all lowercase letters in their file names.
  • Make sure your file names accurately describe their contents. It’s better to name a page links_and_contacts.html than ”page33.html”.
  • If you would like to use dates in your file names, consider using a YYYYMMDD format (for example, 20080901 for Sept. 1, 2008). This will ensure that your files are listed in chronological order when viewed in a directory. It never hurts to include a descriptive name in addition to a date in a file name – for example, schoolboard_20080514.html for a May 14, 2008 school board meeting – just to make things easier on yourself two months from now.

Next Section

Powered by WordPress. Designed by Woo Themes