Node Notes

SSH Notes

head tag

Page information.
Elements inside <head> can include scripts, instruct the browser where to find style sheets, provide meta information, and more.
The following tags can be added to the head section: <base>, <link>, <meta>, <script>, <style>, and <title>.
The <title> tag defines the title of the document, and is the only required element in the head section!

Eample

<html>
<head>
<title></title>
</head>

Elements that can be used inside a <head> element:
Tag Description
<head>

Information about the document. <head> element represents a collection of metadata about the document, including links to or definitions of scripts and style sheets.

<!-- Defining the charset in HTML4 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<!-- In HTML5 -->
<meta charset="utf-8">

<!-- Redirect page after 3 seconds -->
<meta http-equiv="refresh" content="3;url=http://www.yoursite.com/"

<title>

Title of the document

<title>Elements that can be used inside a <head> element:</title>

<base>

Specifies the base URL to use for all relative URLs contained within a document.

<base href="http://www.yoursite.com/">
<base target="_blank" href="http://www.yoursite.com/">

<link>

Relationships between the current document and other documents.

<link href="/default.css" rel="stylesheet" type="text/css" title="Default Style">
<link href="/fancy.css" rel="alternate stylesheet" type="text/css" title="Fancy">
<link href="/basic.css" rel="alternate stylesheet" type="text/css" title="Basic">

<meta>

Metadata about an HTML document

<!-- Defining the charset in HTML4 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<!-- In HTML5 -->
<meta charset="utf-8">

<!-- Redirect page after 3 seconds -->
<meta http-equiv="refresh" content="3;url=http://www.coolsite.com/">

<script>

Defines a client-side script

<!-- HTML4 and (x)HTML -->
<script type="text/javascript" src="/javascript.js">

<!-- HTML5 -->
<script src="/javascript.js"></script>

<style>

Defines style information for a document

<style type="text/css">
body {
color:red;
}
</style>

0
0
0
s2smodern

| |

Copyright © 2017. All Rights Reserved.

/** *
SiteLock
*/