# align5.html - align attribute to css

# Using align="center"

This file contains an element <h1 align="center">, but it also applies to any element, like <p..., <table, etc...

The 'experimental' Nu Markup Checker flags this as an HTML5 ERROR with the string "Error: The align attribute on the h1 element is obsolete. Use CSS instead."

If 'clean' at present tidy 'silently' replaces this with CSS in TY_(CleanDocument)(doc), in Style2Rule( TidyDocImpl* doc, Node *node), using TY_(AttrGetById)(node, TidyAttr_STYLE);

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
- Else 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