# Attribute “xmlns:msdt” not allowed here.

> Canonical HTML version: https://rocketvalidator.com/html-validation/attribute-xmlns-msdt-not-allowed-here
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

The `xmlns:msdt` attribute is a Microsoft Office namespace declaration, and HTML doesn't allow prefixed namespace declarations on any element.

In XML, `xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"` binds the prefix `msdt` to Microsoft's data types namespace. Office uses it to give each document property a type, with attributes like `msdt:dt="string"`. The HTML parser doesn't process namespace declarations, so it reads `xmlns:msdt` as an unknown attribute that happens to have a colon in its name. The only namespace attribute HTML accepts is `xmlns`, with the exact value `http://www.w3.org/1999/xhtml`. The validator reports `xmlns:msdt` on any element, `<html>` included.

The declaration usually comes with a block of Office document properties, which SharePoint and Office write into the pages they save. The block has its own `<html>` and `<head>` tags, often with `xmlns:mso` next to `xmlns:msdt`, and keeps the properties inside a conditional comment that browsers treat as a plain comment. When the block ends up in the middle of a page, the validator also reports the stray `<html>` and `<head>` tags. Browsers drop the extra `<head>` tags and copy the attributes of the extra `<html>` tag onto the page's real `<html>` element.

Remove the whole block: the extra `<html>` and `<head>` tags and the comment between them. If `xmlns:msdt` sits on the page's own `<html>` tag instead, delete just the attribute. Browsers don't use the declaration or the properties, so the page looks and works the same without them. If the block comes from a SharePoint page layout, remove it from the layout so every page that uses it gets the fix. If it comes from content pasted into a web part, edit that content.

## Invalid example

```html
<div class="page-content">
  <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"><head>
  <!--[if gte mso 9]><xml>
  <mso:CustomDocumentProperties>
  <mso:ContentType msdt:dt="string">Page</mso:ContentType>
  </mso:CustomDocumentProperties>
  </xml><![endif]-->
  </head>
  <p>Our offices are open Monday to Friday.</p>
</div>
```

## Valid example

```html
<div class="page-content">
  <p>Our offices are open Monday to Friday.</p>
</div>
```
