Struts%20Interview%20Questions%20and%20Answers
Question: Why does the option tag render selected=selected instead of just selected?Answer: Attribute minimization (that is, specifying an attribute with no value) is a place where HTML violates standard XML syntax rules. This matters a lot for people writing to browsers that support XHTML, where doing so makes the page invalid. It's much better for Struts to use the expanded syntax, which works the same on existing browsers interpreting HTML, and newer browsers that expect XHTML-compliant syntax. Struts is following the behavior recommended by the XHTML specification.<select id="item" name="item" selected="selected"> <option value="option1">Option1</option> <option value="option2">Option2</option> </select> |
Is it helpful?
Yes
No
Most helpful rated by users:
- What is Struts?
- What helpers in the form of JSP pages are provided in Struts framework?
- How is the MVC design pattern used in Struts framework?
- Who makes the Struts?
- Why it called Struts?