Pages

Wednesday, September 25, 2013

red text in viewsource in firefox / why code is in red in firefox view source

 
 
 
if you wonder why you see red text in view source in firefox.   
 
 
<b><u><font size="2">EN </u></b></font> 
 
refer above example. 
 

here is the reason. 
there must be wrong with its start/end tag, missing double quote, missing single quote
or wrong  opening or closing of tag. 
 
in above example you can see i m closing font at last but i 
should close  it immediately after  text "EN".

4 comments:

  1. < p >text.… < /p >

    What does not like the validator in this case - a point before the character?

    ReplyDelete
    Replies
    1. < p >text.& # 133;< /p >

      Delete
    2. 1. i think if you trim the space < p > as < p >, then it will remove the red line.
      its gives you the warning/error if tags has space in beginning or in end.

      2. if you have already trimmed tags, then it should not be red. Or may be this p tag is red because you are missing something in top.

      Delete
    3. You are right. When I view source code of the online web-page, then in the first line is
      < ?xml version=" 1.0" encoding="utf-8"? > (with red font), next line is DOCTYPE.

      When I view source code of the downloaded .html page, then it is OK and the first line is DOCTYPE.
      Seems like the problem in my .html extension, more correct use of .xhtml version.

      Delete