## Document.CreateElement method

创建指定类型的元素。请注意，返回的实例实现了 Element 接口，因此可以直接在返回的对象上指定属性。

```csharp
public Element CreateElement(string localName)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| localName | String | 标记的名称。 |

### 返回值

的[`Element`](../../element/).

### 也可以看看

* class [Element](../../element/)
* class [Document](../)
* 命名空间 [Aspose.Html.Dom](../../document/)
* 部件 [Aspose.HTML](../../../)


