adding comments. xhtml comments: are useful for making notes to yourself (or future web designers...

4
Adding Comments

Upload: jonathan-mcdonald

Post on 17-Jan-2018

223 views

Category:

Documents


0 download

DESCRIPTION

Comment Syntax: Everything between the will be considered part of the comment by the browser and therefore ignored. Comments can span multiple lines. Line breaks and white space make no difference.

TRANSCRIPT

Page 1: Adding Comments. XHTML Comments: Are useful for making notes to yourself (or future web designers working on your page.) Can function as reminders to

Adding Comments

Page 2: Adding Comments. XHTML Comments: Are useful for making notes to yourself (or future web designers working on your page.) Can function as reminders to

XHTML Comments: Are useful for making notes to yourself (or

future web designers working on your page.)

Can function as reminders to yourself when you redesign the page again, e.g. why you set something up the way you did.

Are not visible when the page is viewed in a web browser but are visible when a page source is viewed by a visitor.

Page 3: Adding Comments. XHTML Comments: Are useful for making notes to yourself (or future web designers working on your page.) Can function as reminders to

Comment Syntax:<!-- This is a comment. -->

<!--This is another comment.It is not visible when the web page is shown in a browser.-->

Everything between the <!-- and the --> will be considered part of the comment by the browser and therefore ignored.

Comments can span multiple lines. Line breaks and white space make no difference.

Page 4: Adding Comments. XHTML Comments: Are useful for making notes to yourself (or future web designers working on your page.) Can function as reminders to

Example Comment:

Comments can be very helpful to us as web designers, as they can prevent us from making harmful updates to our website in the future.

<!--This next link was set up to open in a new window becausesome visitors could not find their way back to my website.--><a href="http://www.yahoo.com" target="_blank">Yahoo!</a>

Yahoo!

Never forget that these comments can be viewed by anyone who chooses to "View Source Code" in their browser. So be careful what you write!