Commenting Syntax

I was asked the other day how to comment in HTML.  I know HTML, but I hardly ever comment in it.  So I thought I would post the syntax for commenting in several programming languages.

C#


//  This is a comment

/* Multiple
    line comment */

/// <summary>XML comments on single line</summary>
/** <summary>XML comments on multiple lines</summary> */

 

VB.NET

' This is a comment
REM This is a comment
''' <summary>This is an XML comment</summary>

 

HTML

<!-- This is a comment -->

 

TRANSACT SQL

select "hello" -- this is a comment
/* This is a muti-line comment */

 

RUBY

# This is a comment
=begin
This is a multi-
line comment
=end

 

VFP

* This is a comment
USE customer    && This is an inline comment

 –

Advertisement

Posted on October 7, 2007, in Misc Development. Bookmark the permalink. Leave a Comment.

Leave a Reply

Please log in using one of these methods to post your comment:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.