tRikSonic

HTML head Tag

Terakhir diperbarui : 24 Mei 2018 - 18.04

Penjelasan html <head>:

Element head mempunyai definisi sebagai element kepala pada sebuah dokumen html.Elemen <head> berisi informasi tentang dokumen HTML yang digunakan oleh browser dan web crawler, pada tampilan browser element ini dalam keadaan tidak terlihat atau tersembunyi.
background html

Berikut adalah element yang dapat digunakan pada element <head> :

  1. title
  2. style
  3. base
  4. link
  5. meta
  6. script
  7. noscript
  8. template
  9. ...

Contoh penerapan html <head>:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Demo Triksonic</title>

<style>
 p {color: blue}
</style>

<script>
function demo(){
  alert("Hanya untuk demo");
}
</script>

<noscript>
<style>
 .js-only{display:none;}
</style>
</noscript>

</head>
<body>

<h2>Triksonic.blogspot.com</h2>
<p>Hello World!</p>

<button class="js-only" onclick="demo();">Tes Javascript</button>

</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Demo Triksonic</title>

<style>
 p {color: blue}
</style>

<script>
function demo(){
  alert("Hanya untuk demo");
}
</script>

<noscript>
<style>
 .js-only{display:none;}
</style>
</noscript>

</head>
<body>

<h2>Triksonic.blogspot.com</h2>
<p>Hello World!</p>

<button class="js-only" onclick="demo();">Tes Javascript</button>

</body>
</html>

Global Attributes:

Element <head> mencakup Global Attributes HTML.

Event Attributes:

Element <head> mencakup Event Attributes HTML.

Browser Support :

Desktop

ChromeYa
SafariYa
FirefoxYa
OperaYa
IEYa
EdgeYa

Mobile

Android WebviewYa
Chrome AndroidYa
Edge MobileYa
Firefox AndroidYa
Opera AndroidYa
iOs SafariYa
Samsung InternetYa

Default CSS :

Browser yang support dengan element <head>, mempunyai nilai default :
head { 
    display: none;
}
X
Run
Klik tombol Run, untuk menampilkan hasil editing, atau menyegarkan editor.