.NET Daily

ASP.net

Web Development Coding Standards Series – HTML

Posted on .

Web Development Coding Standards Series – HTML

Introduction

This post is part of a series that covers most of notable web development coding standards that you should follow.

You can download the document with all of the post from here: [download id=”8″ format=”1″]

You can see here the other posts within the series.


1 HTML General Rules

1.1 Always close your tags;
1.2 Keep your tag names lowercase:
Ex:
Good:

Bad:

1.3 Use H1 – H6 tags. For semantic and SEO reasons, try to use heading tags. The hierarchy of them in the page is important too.
1.4 Wrap navigation with an unordered list;
Ex:

1.5 Always complete the alt attribute of an image;
1.6 For naming ID’s of HTML tags, use Camel Case and for naming classes use lower case:
Ex:

2 HTML Markup Formatting

2.1 Place a comment tag at the end of each important HTML container that notifies the end of that specific tag:
Ex:

2.2 When you want to add comments inside ASP.NET Web Controls, use this syntax:
Ex:

2.3 Use one blank line to separate important HTML containers;
Ex:

2.4 Use TAB for indentation. Do not use spaces. Recommended TAB size is 4;

Darius

Darius

Darius Dumitrescu is a creative Senior CMS Consultant with in depth .NET knowledge, focused on Web Development and Architecture Design.

There are no comments.

View Comments (0) ...
Navigation