HTML files must have an extension of .html or .htm. Rules include: start with a letter or underscore, end with a letter, number, or symbol, no spaces, no more than 255 characters, case-insensitive, use descriptive names, avoid special characters.
HTML file naming rules
What is an HTML file?
HTML (Hypertext Markup Language) files are text files used to create web pages. They contain markup that defines the structure, appearance, and behavior of a web page.
HTML file naming rules:
Extension:
All HTML files must end with .html
or .htm
is the extension. .html
is the recommended extension.
File name:
Uppercase and lowercase:
index.html
and INDEX.HTML
are the same. Use descriptive names:
Special characters:
Example:
index.html
: Home page of the websiteabout- us.html
: About page contact-form.html
: Page containing contact form products-list.html
: Pages Listing ProductsFollowing these rules will ensure that your HTML files are named consistently and are easy to understand.
The above is the detailed content of html file naming rules. For more information, please follow other related articles on the PHP Chinese website!