Sign In | Subscribe

Enter your Sign on user name and password.

Forgot password?
  • Follow us on:
Start learning today, and be successful in your academic & professional career. Start Today!
Loading video...
This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of Adobe Dreamweaver CS6
  • Discussion

  • Study Guides

  • Download Lecture Slides

  • Table of Contents

  • Transcription

  • Related Books

Start Learning Now

Our free lessons will get you started (Adobe Flash® required).
Get immediate access to our entire library.

Sign up for

Membership Overview

  • Unlimited access to our entire library of courses.
  • Search and jump to exactly what you want to learn.
  • *Ask questions and get answers from the community and our teachers!
  • Practice questions with step-by-step solutions.
  • Download lesson files for programming and software training practice.
  • Track your course viewing progress.
  • Download lecture slides for taking notes.
  • Learn at your own pace... anytime, anywhere!

HTML Naming Conventions

  • HTML has specific rules that must be followed for naming files, folders, images, etc. within your website
  • Because a web server is responsible for providing web pages, the server determines how pages should be named & what specific rules should be followed
  • This course will always follow best practices, just be aware that best practices can change over time
  • File naming convention best practices:
    • no spaces
    • lowercase names
    • Unix servers do not like upper case
    • can use underscore or dash but no other special characters
    • file extension- can use either one
    • .htm or .html
    • be consistent across the entire web site

HTML Naming Conventions

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

  • Intro 0:00
  • Examples of Different Naming Conventions 0:49
    • Headless Camel Casing
  • File Extension Options 4:22
  • Summary of Naming Conventions 5:25

Transcription: HTML Naming Conventions

I Now want to talk about HTML naming conventions.0000

And if you are coming from, basically, any other type of industry, it gets really awkward trying to work with websites, because HTML has some limitations to it.0004

And getting used to those limitation can get tricky.0016

So, let me show you exactly what I am talking about, I just want you to become familiar with what you can name things and how you can name them, so you can set up a standard for yourself for doing so.0021

You do not want to build a website, have it all set to go, try and upload it to the web server.0033

And the web server would not let you upload anything because you have got all this information just in the names of the content and it would not take it.0039

So, let us look at some options for HTML naming conventions.0049

I have a site set up in Dreamweaver and this is only to show you some examples of the different types of naming conventions.0054

It is not a real website at all, so I don't want you to be thrown by that.0064

First of all, we have our website up at the top.0069

Now, within this website there are some folders and that is the piece I want to talk about.0072

Within our folders structure here, we have some different naming conventions.0078

If you look at first folder in the list here, it says html-files, everything is lowercase with the dash in between the two words, or if there are three words you put a dash between those.0084

The reason for that is HTML does not allow spaces.0101

So, you do not want to have spaces in your file names and there are some web servers that are really picky about few other things.0105

We want to make sure you never have trouble just due to a file name, so I just want to familiarize you here.0115

This is one option if I have two words, I keep them both lower case and separate them with the dash, that is one method.0123

The other method we can look at if it is a two words content, whether it would be a page name, folder name, image name, anything inside your website or it needs two pages to describe it.0131

the name of a PDF file, the name of a word document, whatever it is if it has two words to describe it, these are the methods or standards you can use for it.0143

So, the second one has a fancy name, it is called headless camel casing.0154

If I did Camel casing, the first letter would be uppercase and in other words, every word would have an uppercase, just like hump sonic Camel.0162

This one is headless camel casing, because it starts with a lower case letter.0174

Now, if you noticed, all four of these start in lowercase letters, 30178

it is always better to begin your names with lowercase.0183

There are some web servers that are very particular about this and you can transition your website to any web server.0190

These are the naming conventions or the best ones to follow.0199

So, everything starts in lower case, this one starts in lower case and has an uppercase F for the second word.0205

So instead of staying lowercase with a dash, we use an uppercase second word.0212

The next one uses an underscore between the two words keeping everything lowercase, and the last one you just kind of throw everything lowercase together.0219

This one gets a little bit difficult to read, so that is up to you.0229

But, you should come up with a standard for working with your pages, image names, everything inside your website, and stick with it.0234

You would now want to have a website that has all these mixtures within them.0244

So, just be aware, it is important to name your images, your documents your HTML pages, your folders, everything inside your website with the same type of naming standard.0248

Now, the other decision you have to make, or maybe not, depending on your circumstances, is do you want to end your HTML piece with .htm or do you want to end it with .html?0263

Either one is available it is totally up to you.0279

My recommendation is always to follow the naming conventions of a website if you are stepping into one that is already created.0283

Look at what the other people have done and just follow it.0291

If you are starting from scratch, you get to make these big decisions.0295

So, do I go .htm or .html?0300

The reason there are two is because computers used to drop the fourth letter, so you are typing in html, the computer would not accept the l.0304

So, older websites tend to have the .htm, newer ones the .html but it is really personal preference at this point, so it is up to you.0315

HTML versus HTM, make a decision on that one, and then, what other types of naming convention you are going to follow if there are two words in the name?0326

Set that up right up front, that can become a part of your design document even or your project documentation.0338

These are the standards we are going to follow as we create webpages for this website.0344

Believe me, you will be happy that you planned it all out instead of getting to that point where you are trying to upload a web server will not accept it.0351

And there are some very picky web servers out there.0361

To avoid having any issues, which is the goal of this course, from me to you, because trust me, I have made all those problems myself.0364

I want to avoid that.0375

So, decide on these particular items and through my website, unless there is a specific reason not to follow those standards, I will try to do the same.0378

Those are some HTML naming conventions and naming standards and in many instances you get to make those decisions but they are decisions you want to make up front and stick with them, because HTML is particular.0389