Highlighted

Inline [Partial] Comment

Engaged ,
Dec 11, 2017

Copy link to clipboard

Copied

Suppose I would like the server to ignore only a portion of a line of html. What are the symbols for that, if any? I seem to recall past use of those, but would prefer not to embark on a trial-and-error experimentation to try to recover them.

With thanks in advance,

and best holiday wishes,

jwc

Adobe Community Professional
Correct answer by Jon Fritz II | Adobe Community Professional

Jack  wrote

Right, but please see my reply to Nancy. I wondered if there was a character-set that would allow the server to ignore just a portion of a line of html, as in, for example:

     The quick brown fox jumped <<under>>over the lazy dog’s back,

where all content between << . . . >> would be ignored.

Is there an ‘ignore' character set, that one can use ‘inline’, in place of ‘<<' . . . '>>’ above?

Best,

jwc


Either of the options I mention will work, with html comments...

<div>
<p>Some text goes here<!-- this is commented out--> and the rest goes here</p>
</div>
<!-- <div>this div is hidden</div> -->

(which displays exactly as above for someone viewing the source) or with php comments...

<div>

<p>Some text goes here<?php /* this is commented out */ ?> and the rest goes here</p>

</div>

<?php /* <div>this div is hidden</div> */ ?>

Which I like better, because it displays as...

<div>
<p>Some text goes here and the rest goes here</p>

...when the source is viewed. Nobody can see what code, portion of a line, block of text or notation you're using by viewing your source, php comments never make it to the viewer's browser.

Views

241

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Inline [Partial] Comment

Engaged ,
Dec 11, 2017

Copy link to clipboard

Copied

Suppose I would like the server to ignore only a portion of a line of html. What are the symbols for that, if any? I seem to recall past use of those, but would prefer not to embark on a trial-and-error experimentation to try to recover them.

With thanks in advance,

and best holiday wishes,

jwc

Adobe Community Professional
Correct answer by Jon Fritz II | Adobe Community Professional

Jack  wrote

Right, but please see my reply to Nancy. I wondered if there was a character-set that would allow the server to ignore just a portion of a line of html, as in, for example:

     The quick brown fox jumped <<under>>over the lazy dog’s back,

where all content between << . . . >> would be ignored.

Is there an ‘ignore' character set, that one can use ‘inline’, in place of ‘<<' . . . '>>’ above?

Best,

jwc


Either of the options I mention will work, with html comments...

<div>
<p>Some text goes here<!-- this is commented out--> and the rest goes here</p>
</div>
<!-- <div>this div is hidden</div> -->

(which displays exactly as above for someone viewing the source) or with php comments...

<div>

<p>Some text goes here<?php /* this is commented out */ ?> and the rest goes here</p>

</div>

<?php /* <div>this div is hidden</div> */ ?>

Which I like better, because it displays as...

<div>
<p>Some text goes here and the rest goes here</p>

...when the source is viewed. Nobody can see what code, portion of a line, block of text or notation you're using by viewing your source, php comments never make it to the viewer's browser.

Views

242

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 11, 2017 0
Adobe Community Professional ,
Dec 11, 2017

Copy link to clipboard

Copied

When you say a partial line of HTML, make sure you're not creating code errors for yourself.

<h4>Heading 4 </h4>

<!--html commented out code goes inside here-->

<p>This is a sentence in a paragraph</p>

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 11, 2017 0
Engaged ,
Dec 11, 2017

Copy link to clipboard

Copied

I take this to mean that it is not possible to comment-out a part of a line(?).

IOW, I thought that there were alternative start/stop symbols for commenting-out a part of a line of html.

Best,

jwc

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 11, 2017 0
Adobe Community Professional ,
Dec 11, 2017

Copy link to clipboard

Copied

I typically use php comments if I'm hiding something from the browser...

<?php /* your code here */ ?>

On a .php page, the server will remove the entire comment from your code.

Anyone looking at the page source sees only what the browser sees, no <!-- start header here --> or <!-- end footer --> mixed into your final html.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 11, 2017 0
Engaged ,
Dec 11, 2017

Copy link to clipboard

Copied

Right, but please see my reply to Nancy. I wondered if there was a character-set that would allow the server to ignore just a portion of a line of html, as in, for example:

The quick brown fox jumped <<under>>over the lazy dog’s back,

where all content between << . . . >> would be ignored.

Is there an ‘ignore' character set, that one can use ‘inline’, in place of ‘<<' . . . '>>’ above?

Best,

jwc

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 11, 2017 0
Adobe Community Professional ,
Dec 11, 2017

Copy link to clipboard

Copied

Please have a look at https://html.com/tags/comment-tag/


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 11, 2017 0
Engaged ,
Dec 11, 2017

Copy link to clipboard

Copied

Link is not working, not in web browser, nor in copy/paste into browser.

Could you please summarize content of the linked resource.

jwc

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 11, 2017 0
Adobe Community Professional ,
Dec 11, 2017

Copy link to clipboard

Copied


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 11, 2017 1
Adobe Community Professional ,
Dec 12, 2017

Copy link to clipboard

Copied

Jack  wrote

Right, but please see my reply to Nancy. I wondered if there was a character-set that would allow the server to ignore just a portion of a line of html, as in, for example:

     The quick brown fox jumped <<under>>over the lazy dog’s back,

where all content between << . . . >> would be ignored.

Is there an ‘ignore' character set, that one can use ‘inline’, in place of ‘<<' . . . '>>’ above?

Best,

jwc


Either of the options I mention will work, with html comments...

<div>
<p>Some text goes here<!-- this is commented out--> and the rest goes here</p>
</div>
<!-- <div>this div is hidden</div> -->

(which displays exactly as above for someone viewing the source) or with php comments...

<div>

<p>Some text goes here<?php /* this is commented out */ ?> and the rest goes here</p>

</div>

<?php /* <div>this div is hidden</div> */ ?>

Which I like better, because it displays as...

<div>
<p>Some text goes here and the rest goes here</p>

...when the source is viewed. Nobody can see what code, portion of a line, block of text or notation you're using by viewing your source, php comments never make it to the viewer's browser.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 12, 2017 0