I am a more than a bit of a kludge when it comes to both web design and HTML Coding. However, I am slowly seeing the error of my ways, and want to see the light, ...the path to HTML righteousness. Do you experienced webmasters have recommendations for an HTML editing and preferably auto-repairing software? Bear in mind please that I am significantly HTML challenged: when the error message says: "[30] The "div" tag is contained in a "font" tag (which was opened in line 265). This may be acceptable for some browsers (such as Internet Explorer and Netscape), but HTML 4.01 and XHTML do not allow this. It may also cause problems or unexpected page rendering for more compliant browsers such as Opera and Mozilla. Possible solutions: 1. Close the "font" tag before using the "div" tag. Depending on the correct usage of the closed tag, you may be able to reopen it after using the "div" tag; 2. Eliminate the "div" tag; or 3. Reorder the "div" and "font" tags." my first inclination is to say "Whut chew on abaht, Sunshine?" , not "Oh, yes, of course!" I use CoffeeCup's HTML editor which I really don't like, as I find it quite unstable on my machine. I quite like the look of NetMechanic, but haven't found a thorough review of that package. Any suggestions, gratefully received. thx!
This message advises you not to use the <font> tag and use CSS formatting instead. For example, instead of this <p><font color="red">some text</font></p> , it is better to use this <p style="color: red">some text</p> Better yet, if this paragraph style is commonly used, you should define a class and use this class instead of the style: <p class="warning">some text</p> There are tools that will replace all <font> tags with CSS styles (e.g. http://www.w3.org/People/Raggett/tidy/). The output will be machine-generated (i.e. no names, just a bunch of alphanumeric IDs), but you can rename it later to match to what this style actually used for. J.D.
JD Thank you for your input (I think!) Re http://www.w3.org/People/Raggett/tidy/ I have heard of Tidy before, but didn't pursue it as it seemed too daunting. I will take another look.
try using dreamweaver with xhtml as the doc type. a lot of people complain about code bloat, but this has never been a serious issue. in fact, with syntax selection and quick code insert, coding has never been easier...
Generally.. <font> is no good. Like it has been said before.... use styles (CSS). It will give much smaller HTML code. CSS can be cached while most HTML pages with dynamically genereted content can't be cached
Indirectly. It's specifically warning of the block-level <div> element being enclosed within the inline <font> element - which isn't legal HTML. Another recommendation for Tidy. Though I really think there's nothing better than just doing the hard-graft of learning the syntax and writing it yourself in a good code editor. Letting an automated tool handle the process is inevitably going to generate errors. Dreamweaver does have an excellent code editing interface, and I also recommend the Scite editor (http://www.scintilla.org/SciTE.html), which is a simple but very flexible editor.
Correct Tidy is a good tool to do the initial conversion. I have seen many people using XHTML doctype and HTML content and vice versa. When I have to work on a page like this, I run it through tidy first and then finish it by hand. J.D.