345 private links
It can be a meme: instead of talking about semantics, UX is trendy and can be used as trendy shit word instead.
UX HTML is more accessible, less error-prone, more maintainable because it uses the right tags and attributes. Yes it is semantic at the end.
So UX of HTML matters.
Let's take a look at how to spin up a simple Node server and use custom elements as templates in three popular formats
As always it depends of the need.
A lightweight frameworks for HTML templating
The URL could become https://www.htmhell.dev/adventcalendar/2023/ later on
Great explanation of the rel attributes that provide:
- information to the resource linked
- behaviors while navigating
Create an accessible <marquee> tag
Use
<button>if you can count on JavaScript being available, and flipping the switch has an immediate effect.
Use<input type="checkbox"if you want to progressively enhance the control, and flipping the switch will only take effect when the user submits it.
The post explains how.
Ja klar, bei manchen Sachen sollte man das mit ARIA Elementen anreichern, aber bei vielem könnte man es verbessern indem man einfach die richtigen HTML Tags/Attribute verwendet.
Use Cases anzeigen und sie durchsuchen können.
Beispielen:
- Accordion:
<details>/<summary> <dialog>- Definitionsliste:
<dl>/<dt>/<dd> - Definition steht im Paragraph
<dfn> - Listen:
<ol>/<ul> - Mehr Kontekt
<time>,<kbd>,<abbr> - Separator zwischen Paragraphen:
<hr> - Abkürzung:
<address><quote>/<blockquote>/<cite>- semantische Struktur der Seite:
<article>/<section>mit o. ohne Heading /<footer>/<header>/<main>/<aside>/<nav>
A section tag start to be a generic région only when it is labelled. It provides semantics, but nothing else out of the box.
As developer it increase readability and allow to quickly set a specific landmark when needed.
Nice to get it right the first time with a minimal example
box-sizing does not work well with details and summary: it is implemented as shadow DOM in Chrome.
How many HTML tags do you know?