Comment HTML Code

Posted on 2011-10-21
Last Modified: 2012-05-12
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=" 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, 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.
Question by:rtod2
    LVL 33

    Expert Comment

    <!-- like this -->
    LVL 13

    Accepted Solution

    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.
    LVL 9

    Assisted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
    The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now