diff --git a/Libraries/LibHTML/DOM/Element.h b/Libraries/LibHTML/DOM/Element.h
index 7b5c4eb3df..4444bd497a 100644
--- a/Libraries/LibHTML/DOM/Element.h
+++ b/Libraries/LibHTML/DOM/Element.h
@@ -54,6 +54,8 @@ public:
LayoutNodeWithStyle* layout_node() { return static_cast(Node::layout_node()); }
const LayoutNodeWithStyle* layout_node() const { return static_cast(Node::layout_node()); }
+ String name() const { return attribute("name"); }
+
private:
RefPtr create_layout_node(const StyleProperties* parent_style) const override;