Fixing the “attribute ‘vlink’ not allowed here” EPUB Error
The error: attribute “vlink” not allowed here; expected attribute “class”, “dir”, “id”, “lang”, “style”, “title” or “xml:lang”
Why This Happens
vlink is a legacy HTML attribute (used to set the color of visited links) that Microsoft Word often inserts into the <body> tag automatically when you save a document as HTML. It was valid in old-style HTML but isn’t allowed in the stricter XHTML/EPUB format that ebook platforms require — which is why it triggers a validation error during conversion.
How to Fix It
- Open your document in Microsoft Word.
- Go to Save As, and choose **Web Page, Filtered (.htm; .html) as the file type.
- Close the document in Word.
- Open the saved HTML file in a plain text editor (Notepad on Windows, TextEdit in plain-text mode on Mac).
- Use Find and Replace (not just Find) to search for vlink.
- Replace it with a single space, and make sure you select Replace All rather than replacing just the first instance — this attribute can appear more than once in the file.
- Save the file and re-run it through your EPUB conversion or validation tool to confirm the error is gone.
A Quick Tip
While you’re in the file fixing vlink, it’s worth checking for its close relatives — alink, link, text, and bgcolor — since Word tends to insert all of these legacy body-tag attributes together, and each one can trigger the same kind of validation error individually.
Skip the Manual Fixes
If you’d rather not hunt through raw HTML for legacy attributes, we format manuscripts to be clean and validation-error-free from the start.
See our other resources covering ePub errors.
