# bodyatts5.html - body attribute to css

This file contains a body element <body background="images/non-existing.jpg">

The 'experimental' Markup Validation Service flags this as an HTML5 ERROR with the string "The background attribute on the body element is obsolete. Use CSS instead."

If 'clean' at present tidy 'silently' replaces this with CSS in CleanBodyAttrs( TidyDocImpl* doc, Node* body ), called from CreateStyleElement( doc ), in void TY_(CleanDocument)( TidyDocImpl* doc )

Q: Should this behaviour be modified?

A: There are various possibilities

- If the document is configured (or found?) to be HTML5, then
  - If clean configured
    - Fix it silently, as now
    - Fix it with a warning
    - No fix and flag as an error, like the validator
  - Clean not configured
    - No fix, with no warning or error, as now
    - Fix it with a warning
    - No fix and flag as an error, like the validator
- If NOT configured (or found?) to be HTML5
  - If clean configured
    - Fix it silently, as now
    - Fix it with a warning
  - Clean not configured
    - Flag as a warning
    - Flag as an error
    - No warning or error, as now