twitch
Oct 29 2005, 07:04 PM
| | Although a lot of people are against validation, it makes us better at designing. By validating your website and routing out all of the errors, we can make better and more usable sites. Something that XML/XHTML was developed for.
Vujsa, this is a very good thread. However, I believe you failed to mention WHY we put the contents of a script in comment tags. The answer is that older browsers (IE 3.0) may not be able to perform the actions of the script, and would display it as text. By putting it in comment tags, it is kept from displaying, but the browser still reads and processors the script. |
Reply
vizskywalker
Oct 30 2005, 09:25 PM
Also, if you are using XHTML, be sure to read the documentation on how to do comments. In XHTML 1.0 Strict, putting HTML comments around code inside javascript tags is invalid, and will cause lack of validation. Instead, you need to use the CDATA comments. ~Viz
Reply
Quatrux
Oct 30 2005, 10:47 PM
I almost never use comments in html unless i want to make a comment for myself.. the output php shows me as html is usually different and stuff, i never watch it, only to make valid and clean in the making period, and later when everything runs smooth i never watch the source.. maybe it is due to my html is never being very complicated, i just see it with my eyes as a web browser  but comments due help, even if it is said: "a real programmer does not need comments, the code is obvious to him" but sometimes the codes i wrote say a year back is not so understandable, that is why I started to write comments and another reason is because i might work with other people who will edit/write it too.
Reply
Logan Deathbringer
Oct 31 2005, 03:17 AM
Although I don't comment my HTML like I should, and must admit that I pay the price later on...lol. Anyone who is just starting out should comment their HTML and any scripting/programing they do. As stated by Vujsa and others this helps with revisions later on, ALSO it helps when giving a friend a copy to look over when you need help troubleshooting a page or whatever so that they can tell at a glance what you were trying to do in a certin section without haveing to pull out a 5 lb. 4 ring binder full of coding notes to track down some obscure and rarely used, by the troubleshooter, bit of code
Reply
twitch
Oct 31 2005, 04:40 AM
QUOTE(guy @ Oct 29 2005, 07:04 PM) Although a lot of people are against validation, it makes us better at designing. By validating your website and routing out all of the errors, we can make better and more usable sites. Something that XML/XHTML was developed for. Vujsa, this is a very good thread. However, I believe you failed to mention WHY we put the contents of a script in comment tags. The answer is that older browsers (IE 3.0) may not be able to perform the actions of the script, and would display it as text. By putting it in comment tags, it is kept from displaying, but the browser still reads and processors the script. Sorry vujsa, I failed to see that you did explain, in brief, why comment tags are used in <script> tags.
Reply
minnieadkins
Oct 31 2005, 06:48 PM
Comments make the code. HTML comments aren't very widely used, but they do help, especially if you plan on modifying your layout in the future. It's also a good practice to comment the end of your functions (php, c++, java, etc) and the beginning to display what they actually do. While loops, foreach loops, if statements all pose a threat of error. All it takes is overlooking that one little '}' and there you have it. ERROR. Good advice on the comments, although I personally think you can have too many comments. Keep it informative and direct. Don't make half your document comments. =/ For a nice free text editor, I recommend HTMLKit from Chami. When you put in your javascript it automatically puts in the comment to keep older browsers from reading your script. It's a very nice editor, and very customizable. Lots of plugins for php as well. I recently used notepad++ and it's pretty good for all kinds of languages, and you can minimize your blocks effectively.
Reply
Recent Queries:--
how to make comment tags - 27.04 hr back. (1)
-
how to make an html comment - 28.43 hr back. (1)
-
how to make comments in xhtml - 33.58 hr back. (1)
-
how to make comments alignments in html delphi - 42.08 hr back. (1)
-
how to make a good comment - 23.86 hr back. (2)
-
how to make comment in html - 70.49 hr back. (1)
-
how to create comments on html - 217.77 hr back. (1)
-
how do make comments in html - 228.70 hr back. (1)
-
how to create comment posting in html - 273.10 hr back. (1)
-
html how to make a comment - 275.34 hr back. (1)
-
commenting html - 278.50 hr back. (1)
-
html how to make comments - 294.70 hr back. (1)
-
how to make comments with html - 327.38 hr back. (1)
-
how to do a html comment - 346.31 hr back. (1)
Similar Topics
Keywords : good, comments, make, good, html, commenting, makes, html, easier, write
- Basic Html Tutorial
Made it myself, hope you like it. (1)
Html Basic Tutorial
<!-- For beginners only --> (9) Knowledge HTML stands for H yper T ext M arkup L anguage. You cannot create an HTML file
using a rich-text editor, such as Microsoft Word or Wordpad. HTML To write a basic HTML, you will
need to start with this: CODE The html > tag tells the browser that this is an HTML page.
To close any tag, the same tag will be repeted but with the "/" sign. For example, CODE
Page title Did you notice the /title >, /head > & /html > tags? That's how we
close the tag. The HEAD > Tag A head > tag will include the meta >, titl....
HTML Tags
Ever wondered what a HTML tag was (4) Many people that i have met have mentioned HTML to me without really knowing what it really means.
Because of this i thought that maybe it would be a good idea to compile a tutorial for everyone to
read. When i listen to people talking about HTML; they never seemed to know what a HTML tag was so
that is what i will focus on here. ------------------- Some people who use HTML may notice that I
place the tags below in the order they appear in a document. Most people who use HTML know the tags
which no HTML document can do without. Those are: = this is the tag which ev....
Quick Html!
Three of the coolest scripts! (3) Table of contents: -Meta -Cursor -Icon -Animated Title Bar (Must see!) META Meta tags is
one of the most important things you need to know about programming. It truly will help you is more
ways then you can imagine. First off you may be wondering what a meta tag is. A meta tag is a simple
few lines of code that you put in the header of your document to describe it. If you do this
correctly you can get search engines (including Google) to add your website. There are a few things
you want to keep in mind when your making your meta tags. Make sure that you stay on ....
HTML 102 - Web Design For Beginners
More Basic HTML Writing (6) HTML 102 - Web Design For Beginners More Basic HTML Writing This will be part two of a
multi-part HTML tutorial. Please don't post advanced HTML replies to this article. This
tutorial is specifically written for beginning HTML writers. Requirements: Software: Web Browser,
HTML Editor. Knowledge: HTML 101 - Web Design For Beginners. Skills: Ability to press the
keys on the keyboard. So you have read and understood HTML 101 - Web Design For Beginners and
you want to learn more. So far we have talked about a very basic web page. Black on white an....
HTML 101 - Web Design For Beginners
Absolute Basic HTML Writing (7) HTML 101 - Web Design For Beginners Absolute Basic HTML Writing This will be part one of a
multi-part HTML tutorial. Please don't post advanced HTML replies to this article. This
tutorial is specifically written for beginning HTML writers. Requirements: Software: Web
Browser, HTML Editor. Skills: Ability to press the keys on the keyboard. Any web browser will
work as long as it can open files saved on your hard drive. -> Netscape and Internet Explorer are
both free and easy to use. Any HTML editor will work as long as it is an HTML editor and not a web....
Converting HTML over to XHTML
Crossing over to the darkside (13) Allow for alterations Well, I've just had to convert another HTML 4.01 Transitional website
over to XHTML (eXtensible HyperText Markup Language) 1.0 Transitional, I will later on convert over
to XHTML 1.0 Strict as soon as I write the CSS (cascading stylesheet) file for it but it had to be a
quick update and removing all presentational elements and placing them in a CSS file is not quicker
than just altering some tags. So this is where I got the idea to write a How to Convert HTML over
to XHTML . Let's begin I'm having trouble knowing where to start ....
Looking for good, comments, make, good, html, commenting, makes, html, easier, write
|
*SIMILAR VIDEOS*
Searching Video's for good, comments, make, good, html, commenting, makes, html, easier, write
|
advertisement
|
|