about summary refs log tree commit diff stats
path: root/html/attributes.go
diff options
context:
space:
mode:
Diffstat (limited to 'html/attributes.go')
-rw-r--r--html/attributes.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/html/attributes.go b/html/attributes.go
index 8988ab3..0bc5268 100644
--- a/html/attributes.go
+++ b/html/attributes.go
@@ -109,7 +109,14 @@ func Content(v string) g.Node {
 	return g.Attr("content", v)
 }
 
+// Data attributes automatically have their name prefixed with "data-".
+func Data(name, v string) g.Node {
+	return g.Attr("data-"+name, v)
+}
+
 // DataAttr attributes automatically have their name prefixed with "data-".
+//
+// Deprecated: Use [Data] instead.
 func DataAttr(name, v string) g.Node {
 	return g.Attr("data-"+name, v)
 }
@@ -214,6 +221,11 @@ func Step(v string) g.Node {
 	return g.Attr("step", v)
 }
 
+func Style(v string) g.Node {
+	return g.Attr("style", v)
+}
+
+// Deprecated: Use [Style] instead.
 func StyleAttr(v string) g.Node {
 	return g.Attr("style", v)
 }
@@ -226,6 +238,11 @@ func Target(v string) g.Node {
 	return g.Attr("target", v)
 }
 
+func Title(v string) g.Node {
+	return g.Attr("title", v)
+}
+
+// Deprecated: Use [Title] instead.
 func TitleAttr(v string) g.Node {
 	return g.Attr("title", v)
 }