Search code examples
htmlcssclassspring-form

What is the difference between class and cssClass property in spring form


Below is the usage of class and cssClass. I am a newbie to Spring and confused between the two class properties. why don't we use just class in the place of cssClass

            <tr>
                <td><spring:message code="label.employeeName" /></td>
                <td><springForm:input path="employeeName" class="form-text" /></td>
                <td><springForm:errors path="employeeName" cssClass="error" /></td>
            </tr>

Solution

  • CSSClass is an ASP.Net property for ASP.NET controls. Class is an html attribute. The CSSClass property is rendered as Class in html. Interestingly, you can specify multi-class in CSSClass property in the same manner as the Class - separated by a space.