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

Code coverage is not a quality metric

You've just finished a new feature. The pull request is approved, the pipeline is green, and your coverage report proudly shows 100%. Great. Right? Well, not necessarily. One of the biggest misconceptions I still encounter in software teams is the belief that a high coverage percentage automatically means high quality software. It doesn't. In fact, I've seen teams proudly report 90%+ coverage while still shipping serious production…

Continue reading

What I've learned from interviewing Junior Developers

Over the years I've interviewed and spoken with many junior developers. One thing I've noticed is that most candidates worry about the wrong things. Many juniors spend weeks memorizing framework-specific details, algorithms, or interview questions they found online. They worry about getting stuck during a coding exercise or being asked a question they don't know the answer to. Meanwhile, the candidates who leave the strongest impression…

Continue reading

Mastering code reviews as junior developer

Mastering code reviews as junior developer

Pull requests, merge requests, and code reviews. You’ve probably heard these terms before. A code review is the moment developers ask each other for feedback. A bugfix or new feature is finished, and before it can go live, someone else takes a look. Even if the change works functionally, there’s often room to…

Continue reading