Monday, 10 November 2014
HTML Comments, Comment Tag
I didn’t think I would be back so soon, but here goes, the first HTML tag I will be learning. The HTML Comment tag, think of this tag as like a little note book, or sticky note. Where you can write important reminder or note above or below the code explaining what the code is actually doing, as a reference so that maybe when you come back after a few months, or when someone else does they can see what you were doing. To put a Comment tag into your code do <!-- This is my note about what the following code is doing --> Everything between the <!-- and --> Is your Comment. There is also the famous Conditional Comments for older versions of Internet Explorer and looks like this <!--[if IE9]-->Then do this code <!--[endif]--> Basically that says if the user is using Internet Explorer 9 then run that code. I am staying with the new Browsers so wont be looking at Conditional Comments in to much detail, but here is a site from MSDN, where you can read up about them.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment