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 provide the body tag inside html. This contains the HTML we want to actually render to the screen, and what we'll do for this one is render a p tag, which is for a paragraph, and we'll have some simple text like Welcome to the chat app:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<p>Welcome to the chat app</p>
</body>
</html>
This is all that's going to show up for the moment. Now, we can move outside the html file, going back into the server file.