3 ms·
I dunno about this. Attributes are supposed to be metadata, not displayed textual content. Like it's fine to give the anchor for a section as an attr: <sec
by mikepurvis 2y ago
I dunno about this. Attributes are supposed to be metadata, not displayed textual content. Like it's fine to give the anchor for a section as an attr:
<section id="animals">
<h2>Animals</h2>
<p>Here are my animal facts</p>
</section>
I would feel strange if a browser's built in CSS were reaching into an element's attribute and rendering the text therein as something visible to the reader.
- flowerthoughts 2y agoI don't think that matters to GP's point. It's the fact that then "name" attribute stays the same no matter the nesting level. There's already <figure><figcaption></figure> and <table><caption></table> as examples of embedded heading. The difference there being that figure and table elements very rarely nest. So allowing h in <section><h><section><h></section></section> to become h1 and h2 would make sense.
- paulddraper 2y ago<input type="button" value="Submit">
- Skeime 2y agoYes, and this is also a mistake, hence the <button> element.
- econ 2y ago::after { content: attr(id) }