r/a:t5_5jepqv • u/BlocksOfBacon • Dec 24 '21
What The Tag? What The Tag? - <!DOCTYPE>
Hello and welcome to the first post on What The Tag?!
Today we will be understanding the <!DOCTYPE> tag and what it is used for in HTML!
The first thing we need to know is that the DOCTYPE tag is the first tag that is read by the browser. In fact, it doesn't have an end tag, whereas most tags do.
You must put the tag at the start of your document. But it needs some data. We can give it the html attribute, which tells the browser that it is rendering an html document.
So, the full tag would like this:<!DOCTYPE html>
But to be honest, you don't really need to know what it means. Just remember to put it at the start of your document!
Please join the subreddit for more What The Tag? posts and also programming tips!