Mastering HTML Basics: A Beginner's Guide

What is the first tag you need to use when creating a new HTML document?

A. <body>

B. <title>

C. <!DOCTYPE html>

D. <head>

Answer:

The correct answer is C. <!DOCTYPE html>

When creating a new HTML document, the first tag you need to use is <!DOCTYPE html>. This declaration tells the browser which version of HTML the document is written in. It is important to include this tag at the beginning of your HTML file to ensure that your code is interpreted correctly by the browser.

After the <!DOCTYPE html> declaration, you can start building the structure of your HTML document by using the <html> tag followed by the <head> and <body> tags.

Remember, the <!DOCTYPE html> tag is not an HTML element but rather an instruction to the browser, so it does not require a closing tag.

← Evolution of technology The frog king story setting →