Professional way to write website codes



When someone say web design, two things always pop up my head. The design to attract visitors and code structure for other developers to read and modified codes.

In this article, I'm going to only talk about the code aspect. Writing codes to get result is not the only success, but rather write codes in a understandable way for other designers to work on later.

both html and CSS has what is called comment. These a comments are piece of code that does not have effect on browser interpretation, but use to label codes for future reference.

Same way JavaScript and php has their own code comments. Without a comment, it is very difficult for someone who is not the initial coder to read and add codes.

I also noticed that even a writer of code can forget what the code for after leaving it for long.

Base on this post, I'm going to make few examples on;

html code comment.

css code comment.

JavaScript code comment.

php code comment.

The above languages are the web tools I'm focusing on this article.

example for html code comment;

<p>This is paragraph.</p>

<! -- This is over paragraph code comment line -->

example for css code comment;

example for JavaScript code comment;

example for php code comment;

// This is php variable count comment line

$count = 1;

echo $count;

With the examples above, another web developer can easily read and modify your code.

Comments

Popular posts from this blog

What is HTML and how can one use it?