Setting up the index.html file for DOCTYPE

For now though, in our index.html file, we'll provide DOCTYPE so the browser knows which version of HTML we want to use. We tell it to use HTML which refers to HTML5. Next up, we'll open and close our html tag:

<!DOCTYPE html><html></html>

This tag is going to let us provide the head and body tags, which are exactly what we'll need to get things working:

  • First up is head. Inside head, we can provide various configuration tags. We'll use just one for now, meta, so we can tell the browser which charset we want to use. In the meta tag, we'll provide the charset attribute, setting it equal to utf-8 inside quotes:
      <!DOCTYPE html>      <html>      <head>        <meta charset="utf-8">      </head>      </html>
  • Next up, we'll ...

Get Advanced Node.js Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.