/ W3SCHOOLS

W3schools - HTML_Head

이 페이지는 다음에 대한 공부 기록입니다
Lecture에서 배웠던 내용을 복습하며 작성했습니다

찾으시는 정보가 있으시다면
주제별reference를 이용하시거나
우측 상단에 있는 검색기능을 이용해주세요

Is a container for the following elements : <title>, <style>, <meta>, <link>, <script>, and <base>

Is a container for metadata (data about data)

Is placed between the <html> tag and the <body> tag

<title>

Defines the title of the document

The title must be text-only

It is shown in the browser’s title bar or in the page’s tab

Is required in HTML documents

Is very important for SEO(Search Engine Optimization)

  • used by search engine algorithms to decide the order when listing pages in search results
<title>Spooonge bob</title>

<style>

Defines style information for a single HTML page

<style>
  body {
    background-color: teal;
  }
  h1 {
    color: wheat;
  }
  p {
    color: tomato;
  }
</style>

Defines the relationship between the current document and an external resource

<link rel="“stylesheet”" href="“mystyle.css”" /> /* most often used to link to
external style sheets */

<meta>

Is used to specify the character set, page description, keywords, author of the document, and viewport settings

Will not be displayed on the page, but are used by browser

<meta charset="“UTF-8”" />
/* Define the char set used */
<meta name="“keywords”" content="“HTML," CSS, JavaScript />
/* Define keywords for search engines */
<meta name="”description”" content="”Free" Web tutorials />
/* define a description of your web page */
<meta name="”author”" content="”John" Doe />
/*define the author of a page */
<meta http-equiv="”refresh”" content="”30”" />
/*Refresh document every 30 seconds */
<meta
  name="”viewport”"
  content="”width"
  ="device-width,"
  initial-scale="1.0”"
/>
/* Setting the viewport to make your website look good on all devices Viewport
is the user’s visible area of a web page(It varies with the device)
`width=device-width` part sets the width of the page to follow the screen-width
of the device `initial-scale=1.0` part sets the initial zoom level when the page
is first loaded by the browser */

<script>

Defines client-side JavaScripts

<script>
  function myFunction(){
  	document.getElementById(demo).innerHTML = Hello JavaScript!;
  }
</script>

<base>

Specifies the base URL and/ or target for all relative URLs in a page

Can only be one single <base> element in a document