Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Tag question : Can an empty tag have attributes (by definition)  RSS feed

 
Roger Graff
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can an empty tag have attributes?
The SCWCD books I've been reading imply that an empty tag is different than a tag with attributes.
My understanding is that an empty tag is a tag without a body (i.e. <bodycontent>empty</bodycontent>. But shouldn't a TLD <tag> still be able to have <attibute> sub tags?
-Graff
P.S. The answer I'm looking for is one that the SCWCD exam would consider to be "correct".
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes an "empty" tag can have attributes.
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In JSTL, <cut> is an example of an empty tag with an attribute.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!