Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

closing tag > as value?

 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I set the value ">=" to my Label?



does not work as > is recogniced as a closing tag.

This does also not work:

 
arulk pillai
Author
Ranch Hand
Posts: 3402
 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks !
 
Tim Holloway
Bartender
Posts: 18419
60
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or, to bring it inline, JSF is an XML form, so it obeys XML rules. There are 5 characters that XML parsers are sensitive to, and which may require escaping (entity specification):

< &lt;
> &gt;
" &quot;
' &apos;
& &amp;

Note that the ";" at the end is required - I've seen some sloppy sites that left them off because apparently some browsers weren't diligent about proper form, but that meant that unless you were running the proper browser, the site looked like an amateur job.

I mentioned that JSF is XML form. You can use JSF in an HTML context, where the rules may be more lax, but I personally recommend using an actual XML context such as xhtml. That way you have the benefit of tools that will do that little extra bit of validation at source time. Also it's easier for automated tools to work with XML formats, since they don't have the unpredictability of raw HTML. For example, unbalanced tags such as <br>.
 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you!!
 
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!