What is the correct XHTML syntax for setting a checkbox as checked?
To set a checkbox as checked in XHTML, you can use the "checked" attribute within the input tag. This attribute does not require a value, simply including it in the tag will mark the checkbox as checked. This is useful when you want to pre-select certain options in a form for the user. ```html <input type="checkbox" name="example" value="1" checked /> Example Checkbox ```
Related Questions
- How can the content type header be effectively set for downloading images in PHP to avoid issues with file opening?
- How can server configurations impact the functionality of PHP functions like mysqli_real_escape_string()?
- What are the advantages and disadvantages of using a DBMS to manage cronjob tasks in PHP?