|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Typing Markup Tags Ending in />I often use self-closing tags (such as <br/>) when creating an ASP.NET
application. However, when I enter them in Visual Studio .NET 2005, it automatically inserts a space before the />. In most cases this does not bother me, but for tags such as <br/> that I usually do not use any attributes with I prefer not to have the extra space. I there a way to prevent Visual Studio .NET 2005 from inserting the extra space before the /> at the end of the tag? Thanks. "Nathan Sokalski" <njsokal***@hotmail.com> wrote in message Do you *really* want your code to be non XHTML-compliant and non news:eJxm9j9KHHA.2140@TK2MSFTNGP03.phx.gbl... > I there a way to prevent Visual Studio .NET 2005 from inserting the extra > space before the /> at the end of the tag? cross-browser compatible...? http://www.w3schools.com/xhtml/xhtml_howto.asp Is <br/> really non XHTML-compliant? Visual Studio .NET might try to create
<br /> instead, but it doesn't mark my tags with a warning or anything. I didn't think getting rid of the space before the / was breaking the rules of XHTML. Is it? Show quoteHide quote "Mark Rae" <mark@markNOSPAMrae.com> wrote in message news:%23dKpND%23KHHA.1044@TK2MSFTNGP02.phx.gbl... > "Nathan Sokalski" <njsokal***@hotmail.com> wrote in message > news:eJxm9j9KHHA.2140@TK2MSFTNGP03.phx.gbl... > >> I there a way to prevent Visual Studio .NET 2005 from inserting the extra >> space before the /> at the end of the tag? > > Do you *really* want your code to be non XHTML-compliant and non > cross-browser compatible...? > http://www.w3schools.com/xhtml/xhtml_howto.asp > "Nathan Sokalski" <njsokal***@hotmail.com> schrieb: No, it is valid XHTML.> Is <br/> really non XHTML-compliant? -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> Nathan,
As Herfried suggests <br/> is valid XHTML. I normally use the W3C Markup Validation Service http://validator.w3.org/ to verify compliant XHTML. -- Show quoteHide quoteHope this helps Jay B. Harlow ..NET Application Architect, Enthusiast, & Evangelist T.S. Bradley - http://www.tsbradley.net "Nathan Sokalski" <njsokal***@hotmail.com> wrote in message news:uvnvhg%23KHHA.536@TK2MSFTNGP02.phx.gbl... > Is <br/> really non XHTML-compliant? Visual Studio .NET might try to > create <br /> instead, but it doesn't mark my tags with a warning or > anything. I didn't think getting rid of the space before the / was > breaking the rules of XHTML. Is it? > -- > Nathan Sokalski > njsokal***@hotmail.com > http://www.nathansokalski.com/ > > "Mark Rae" <mark@markNOSPAMrae.com> wrote in message > news:%23dKpND%23KHHA.1044@TK2MSFTNGP02.phx.gbl... >> "Nathan Sokalski" <njsokal***@hotmail.com> wrote in message >> news:eJxm9j9KHHA.2140@TK2MSFTNGP03.phx.gbl... >> >>> I there a way to prevent Visual Studio .NET 2005 from inserting the >>> extra space before the /> at the end of the tag? >> >> Do you *really* want your code to be non XHTML-compliant and non >> cross-browser compatible...? >> http://www.w3schools.com/xhtml/xhtml_howto.asp >> > > Jay,
"Jay B. Harlow" <Jay_Harlow_***@tsbradley.net> schrieb: I prefer Christoph Schneegans' validator because it provides more accurate > I normally use the W3C Markup Validation Service http://validator.w3.org/ > to verify compliant XHTML. results (it validates against XML schemas): XML Schema Validator <URL:http://schneegans.de/sv/> -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> Thanks for the link, I've saved a copy for future reference.
-- Show quoteHide quoteHope this helps Jay B. Harlow ..NET Application Architect, Enthusiast, & Evangelist T.S. Bradley - http://www.tsbradley.net "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message news:enIulDDLHHA.420@TK2MSFTNGP06.phx.gbl... > Jay, > > "Jay B. Harlow" <Jay_Harlow_***@tsbradley.net> schrieb: >> I normally use the W3C Markup Validation Service http://validator.w3.org/ >> to verify compliant XHTML. > > I prefer Christoph Schneegans' validator because it provides more accurate > results (it validates against XML schemas): > > XML Schema Validator > <URL:http://schneegans.de/sv/> > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://dotnet.mvps.org/dotnet/faqs/> > Do you *really* want your code to be non XHTML-compliant and non Unfortunately w3shcools.com is *not* the authority on internet standards.> cross-browser compatible...? > http://www.w3schools.com/xhtml/xhtml_howto.asp Remember that http://www.w3.org is the group that defines the standard. I would rely on w3.org for the authority on internet standards. Then rely on other groups, such as w3shcools.com, for quirks (pun intended) that specific browsers exhibit. According to the W3C Markup Validation Service http://validator.w3.org/ both <br/> and <br /> are compliant XHTML 1.1! In fact the XHTML 1.0 Recommendation uses <br/> (no space) in their examples! (heading 4.6 Empty Elements) http://www.w3.org/TR/xhtml1/ Further depending on how old the howto page is, it may be totally immaterial! What percentage of users, of the OP's web site, actually use Netscape. What percentage of their users, use a version of Netscape that exhibits the problem. -- Show quoteHide quoteHope this helps Jay B. Harlow ..NET Application Architect, Enthusiast, & Evangelist T.S. Bradley - http://www.tsbradley.net "Mark Rae" <mark@markNOSPAMrae.com> wrote in message news:%23dKpND%23KHHA.1044@TK2MSFTNGP02.phx.gbl... > "Nathan Sokalski" <njsokal***@hotmail.com> wrote in message > news:eJxm9j9KHHA.2140@TK2MSFTNGP03.phx.gbl... > >> I there a way to prevent Visual Studio .NET 2005 from inserting the extra >> space before the /> at the end of the tag? > > Do you *really* want your code to be non XHTML-compliant and non > cross-browser compatible...? > http://www.w3schools.com/xhtml/xhtml_howto.asp > "Nathan Sokalski" <njsokal***@hotmail.com> wrote in You wouldn't want to do this. It is merely following the XHTMLnews:eJxm9j9KHHA.2140@TK2MSFTNGP03.phx.gbl: > I often use self-closing tags (such as <br/>) when creating an ASP.NET > application. However, when I enter them in Visual Studio .NET 2005, it > automatically inserts a space before the />. In most cases this does > not bother me, but for tags such as <br/> that I usually do not use > any attributes with I prefer not to have the extra space. I there a > way to prevent Visual Studio .NET 2005 from inserting the extra space > before the /> at the end of the tag? Thanks. standards. Martin > You wouldn't want to do this. It is merely following the XHTML According to the W3C Markup Validation Service http://validator.w3.org/ both > standards. Umm... <br/> and <br /> compliant XHTML 1.1! Remember the w3.org is the group that defines the standard. -- Show quoteHide quoteHope this helps Jay B. Harlow ..NET Application Architect, Enthusiast, & Evangelist T.S. Bradley - http://www.tsbradley.net "Martin Milan" <I***@m.i.do> wrote in message news:Xns98A96F516743DI8spmido@194.117.143.37... > "Nathan Sokalski" <njsokal***@hotmail.com> wrote in > news:eJxm9j9KHHA.2140@TK2MSFTNGP03.phx.gbl: > >> I often use self-closing tags (such as <br/>) when creating an ASP.NET >> application. However, when I enter them in Visual Studio .NET 2005, it >> automatically inserts a space before the />. In most cases this does >> not bother me, but for tags such as <br/> that I usually do not use >> any attributes with I prefer not to have the extra space. I there a >> way to prevent Visual Studio .NET 2005 from inserting the extra space >> before the /> at the end of the tag? Thanks. > > You wouldn't want to do this. It is merely following the XHTML > standards. > > Martin "Nathan Sokalski" <njsokal***@hotmail.com> wrote in message I believe this goes back to some older browsers (earlier netscapenews:eJxm9j9KHHA.2140@TK2MSFTNGP03.phx.gbl... : : I often use self-closing tags (such as <br/>) when creating an : ASP.NET application. However, when I enter them in Visual Studio : .NET 2005, it automatically inserts a space before the />. In : most cases this does not bother me, but for tags such as <br/> : that I usually do not use any attributes with I prefer not to : have the extra space. I there a way to prevent Visual Studio : .NET 2005 from inserting the extra space before the /> at the : end of the tag? Thanks. browsers, if memory serves) that would not render <br/> or <hr/> correctly without the interveneing space character. Ralf -- -- ---------------------------------------------------------- * ^~^ ^~^ * * _ {~ ~} {~ ~} _ * * /_``>*< >*<''_\ * * (\--_)++) (++(_--/) * ---------------------------------------------------------- There are no advanced students in Aikido - there are only competent beginners. There are no advanced techniques - only the correct application of basic principles.
What is syntax for Eval(User.IsInRole) to return True/False To Vis
How to change the font style and size on the entire Aspx page programatically Ajax Triggers for DropDownList don't fire how to use Click event with programmatically defined button? Newbie Question: How Does One Access an Individual Field in a Record? Create image web control adapter Embeding html controls in Server Control Generating the *.aspx.designer.vb Files Regular Expression Validator question Menu can't refresh |
|||||||||||||||||||||||