Een minimaal HTML5-document

Een minimaal HTML5-document

Dit artikel is ouder dan vier jaar. De inhoud kan verouderd zijn, vooral bij technische voorbeelden of verwijzingen naar tooling.

HTML5 is de nieuwste versie HTML, die nog steeds wordt ontwikkeld. Websites worden steeds meer voorzien van verschillende soorten media, het gebruik van het internet is ook gewijzigd. HTML5 biedt nieuwe mogelijkheden die het gebruik van nieuwe technieken makkelijker maakt.

Een HTML5 document zal minimaal uit de volgende regels bestaan:

<!DOCTYPE html>
<html lang="nl">
  <head>
    <meta charset="utf-8">
    <title>title</title>
  </head>
  <body>
    <!-- pagina inhoud -->
  </body>
</html>

Doctype

De docktype is bij HTML vereenvoudigd. Waar eerder attributen waren om .dtd bestanden te linken is de HTML5 variant kort en eenvoudig.

<!DOCTYPE html>

Html-tag

De tag heeft voor zoekmachines een taal attribute om de taal van de website te definiƫren.

<html lang="nl">

De tag bevat een een meta-tag met de charset. Wat opvalt is dat de tag anders wordt afgesloten. Waar eerder werd gebruikt wordt bij HTML5 gebruikt.

<meta charset="utf-8">

Reacties

Er zijn nog geen reacties, laat je reactie achter.

Laat een reactie achter

Heb je een aanvulling, vraag of eigen ervaring bij dit artikel? Deel hem hieronder.

Reacties worden eerst kort gecontroleerd voordat ze zichtbaar zijn.

Bekijk alle artikelen

The bullshit of code coverage

A test suite can reach 100% coverage and still charge the wrong shipping fee or take a payment twice. Through boundary cases, misleading mocks and missing requirements, I examine what coverage actually proves. The useful question is not whether the code ran, but whether the tests would catch the mistakes your customers care about.

Continue reading

When a monorepo slows you down

Nx can make builds faster while shared code leaves your team waiting for someone else's priorities. Drawing on my experience, I examine the coordination cost behind a tidy monorepo, the difference between useful reuse and forced abstractions, and how DRY can work against simplicity. The question is whether the architecture helps teams deliver, not just share code.

Continue reading

Security by design in Angular

Security by design in Angular

A route guard and a green pipeline do not stop one customer reading another customer's invoice. Using Angular and a .NET API, I turn a security requirement into server-side ownership checks and tests. Security by design starts with boundaries and evidence, before choosing a scanner.

Continue reading