ReasonJun

HTML : Basic (head) (!, Doctype, CSS, Javascript) 본문

Frontend/HTML

HTML : Basic (head) (!, Doctype, CSS, Javascript)

ReasonJun 2023. 6. 5. 13:25
728x90

This is the basic structure of an HTML document. Let's go through each part:

  • <!DOCTYPE html>: This is the document type declaration. It informs the browser that the document is an HTML5 document.
  • <html lang="en">: This is the opening tag for the root element of the HTML document. The lang attribute specifies the language of the document, in this case, English.
  • <head>: This is the head section of the document. It contains meta-information about the document and includes elements that are not directly displayed on the webpage.
  • <meta charset="UTF-8" />: This meta tag specifies the character encoding of the document. UTF-8 is a widely used character encoding that supports a broad range of characters from various languages.
  • <meta http-equiv="X-UA-Compatible" content="IE=edge" />: This meta tag sets the compatibility mode for Internet Explorer. In this case, it specifies that the document should be rendered using the latest version of IE's rendering engine.
  • <meta name="viewport" content="width=device-width, initial-scale=1.0" />: This meta tag is used to control the viewport behavior on mobile devices. It sets the width of the viewport to match the device's screen width and ensures that the initial zoom level is set to 1.0.
  • <body></body>: This is the body section of the document. It contains the visible content of the webpage, such as text, images, links, and other HTML elements.
  • <title>Document</title>: This is the title element. It defines the title of the document, which is typically displayed in the browser's title bar or tab.

So, in summary, the provided code represents the basic structure of an HTML document with the necessary meta information in the head section and an empty body. It serves as a starting point for building a web page, allowing you to add content and additional HTML elements within the body to create the desired webpage.

 

 

Linking CSS & Javascript

The defer attribute of the script element means that javascript will be interpreted after the HTML structure is prepared.HTML Basic (head) (!, Doctype, CSS, Javascript)

728x90
Comments