Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 592
  • Last Modified:

Comment HTML Code

I want to put a comment at the end of line 1 and at the end of line 13 in this code
<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns=http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sabatina's Pizza Home</title>


<div style="text-align: center">
	<img src="sabtinaslogo.jpg" width="735 height="190 alt="Sabtina's Logo" />

Open in new window

.  According to W3schools.org, the <! indicates the beginning of a comment, and --> indicates the end of the comment.  However, notepad ++ produces an undesired effect if this is implemented at the end of line 1.  Please advise how I can best add a comment to the end of a line in HTML.
2 Solutions
Paul MacDonaldDirector, Information SystemsCommented:
<!-- like this -->
I believe that you can not put comments in the middle of an element, which is what you would be doing by putting a comment at the end of line 1 since that is still in the middle of the doctype declaration.
Ya haloexpertsexchange is correct. You can't put comments inside any other element. First try finding the closing of the element and put the comment.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now