Use a HTML5 document declaration:
<!Doctype html>
XML self closing slashes are allowed in HTML5.
In an attempt to turn this into a WordPress question (really, it isn’t): WordPress spits out hard coded XHTML style in many places. Since most people will not send real XHTML, HTML5 is the best option to deal with WordPress’ legacy code while keep validating markup.
Related Posts:
- Validating input using java.util.Scanner
- What is the actual minimum length of an email address as defined by the IETF?
- Server side validation
- Does wp_insert_post validate the input?
- WordPress oEmbed W3C Validation
- How to Remove novalidate attribute from comment form
- What is wp_check_invalid_utf8?
- Data Validation
- Data Validation: Always escape late / escape HTML Code
- Multiple register settings, with same option name – issue
- Inconsistent server code response using HTTP API
- wordpress site validation errors
- Data validation
- Best Practice for Validating and Sanitizing Data
- Does balanceTags() provide any escaping / protection?
- w3c validation problem – Twitter share button pulling content
- Data sanitization for user registration and user login
- wp_remote_post – handling responses
- What data sanitzation function should be used to store entire source code of webpage?
- protect user submitted posts
- Settings API – getting hidden input / submit button’s name
- Why the WP Core team does not allow filter_* functions? [closed]
- confused about sanitize_email after is_email [duplicate]
- Require user to input code from an array of allowed codes with Gravity Forms [closed]
- Output Sanitation
- How do I sanitize the str_replace function in javascript variables
- WordPress live, custom text box validation, how to?
- How to do more than one verify_nonce in one function?
- Jquery Validation Engine with Conatct Form 7
- Gravity Forms validate arrival and departure
- Why is my script’s regex having its backslash removed?
- Validation Always Tells There Is an Open DIV
- How long does plugin review usually take?
- WP calendar summary attribute validation error
- How can I validate an email address using a regular expression?
- Reactjs – Form input validation
- XAML Binding Groups
- “Stray start tag footer” in html validator?
- what is a parse error and how do I fix it
- Validating IPv4 addresses with regexp
- An invalid form control with name=” is not focusable
- Validate date in dd/mm/yyyy format using JQuery Validate
- How can I check if a string is a valid number?
- Check if inputs are empty using jQuery
- Sanitize and data validation with apply_filters() function
- WordPress REST API validation
- How to define a query parameter with REST API?
- Shortcode putting html such as
- How do I sanitize a javascript text?
- Prevent empty Post Title on form submit via front end post (wp_insert_post_)
- Correct Approach for Validating Custom Field Input
- Get the user type of an author
- stray elements
- How to make custom comment fields required and message field not required
- Restrict user registration to emails on a single domain
- Comment form vaildation
- Creating custom AJAX requests
- Sanitizing and validating email field
- Persist fields with Setting API
- Server side validation for Contact Form 7 [closed]
- Settings API – sanitize_callback is not called and it leads to an incorrect behavior
- ACF Custom validation message not showing up
- How to prevent options.php deleting valid existing data from the database
- Validate data on attachment_fields_to_save
- rest_sanitize_value_from_schema doesn’t sanitize string
- Shrink down register_settings on Settings API
- jquery.validation.js is not working in woocommerce checkout page form
- Contact Form 7: Make field required after checkbox is checked
- Permit Login if table row exists
- Show the submitted values in the form when validation fails
- How to use a newly registered setting with a checkbox and the default value ‘true’
- Validating a cloned/repeatable input (jQuery) [closed]
- Stop saving process when metabox is invalid [duplicate]
- HTML Validation fails because of ampersands in RSS link
- Validating widget’s configuration data on Admin page
- How to escape multiple attribute at once in WordPress?
- Validating custom fields before post save
- Remember form field values with page navigation
- Data Validation in wordpress
- WordPress is creating nonce as a logged in user but verifying it incorrectly
- Using $wpdb | checking entered email against existing emails in db
- Required radio button does not validate in form, when clicked through Javascript/jQuery
- jQuery plugin not loading
- Set Default Option Value as Blank for Meta Box
- Safely store code(html/js..) into database
- Remove border attribute from Pin It Button image to pass HTML5 validation [closed]
- Verify Submitted Form Values and Show Warning Messages with Setting API
- Where this validating message come from?
- Contact form – problem with displaying message about sent mail
- How to add custom regex validation to WPForms password field
- validation email signup form buddypress
- Validating Error with submit button
- Plugin option for input box validation
- Conditional required fields for WordPress Contact Form 7
- Contact Form 7: custom validation [closed]
- Reordering fields in registration form via custom plugin
- Validate user meta and redirect
- Custom Registration and Login Forms with reCaptcha 2 Validation
- oneOf JSON Schema validation not properly working for custom post meta value?
- Display notice in block editor after wp_insert_post_data hook