HiveBrain v1.2.0
Get Started
← Back to all entries
patternhtmlMinor

Is this password-submission form valid?

Submitted by: @import:stackexchange-codereview··
0
Viewed 0 times
thispasswordformvalidsubmission

Problem

Does my code contain anything invalid?


    
        
            
                User ID:
                
            
        
        
            
                Password:
                
            
            
                Submit
            
        
        
    
    

Solution

According to the W3C (http://validator.w3.org/)

Your form tag is not valid.

Technically it must have an action attribute:


required attribute "ACTION" not specified in:




The attribute given above is required for an element that you've used, but you have omitted it.

There are a couple of warnings:


Warning: NET-enabling start-tag requires SHORTTAG YES



                                    ^^^


The sequence can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag '). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.

Context

StackExchange Code Review Q#4372, answer score: 6

Revisions (0)

No revisions yet.