HTML Guide for virtual
Invalid value “virtual” was used for the wrap attribute on a textarea.
The wrap attribute controls how the browser wraps text when submitting a form. It accepts only two keyword values:
- soft (default): Lines are not hard-wrapped on submission; the server receives unwrapped lines.
- hard: The browser inserts CRLFs at wrap boundaries on submission; you must also set cols for hard to be valid.
virtual was a non-standard value used by some legacy browsers and is not allowed by the HTML Standard or the W3C validator. Remove wrap entirely to get soft wrapping, or set it to soft/hard as needed. If you choose hard, include a sensible cols value. You can also control visual wrapping with CSS like white-space if needed.
HTML Examples
Example: Reproduces the validator error
<!doctype html>
<html lang="en">
<head>
<title>Textarea Wrap Error</title>
</head>
<body>
<form>
<label for="msg">Message</label>
<textarea id="msg" name="msg" wrap="virtual"></textarea>
</form>
</body>
</html>
Example: Valid fixes
<!doctype html>
<html lang="en">
<head>
<title>Textarea Wrap Fix</title>
</head>
<body>
<form>
<label for="msg-soft">Message (soft)</label>
<textarea id="msg-soft" name="msg" wrap="soft"></textarea>
<label for="msg-hard">Message (hard)</label>
<textarea id="msg-hard" name="msg" wrap="hard" cols="40" rows="5"></textarea>
</form>
</body>
</html>