Lompat ke konten Lompat ke sidebar Lompat ke footer

Mengatur Batas Bawah HTML Menggunakan borderBottom Style DOM

Properti style borderBottom DOM pada HTML digunakan untuk mengatur atau mengembalikan tiga perbedaan properti border-bottom seperti border-bottom-width, border-bottom-style, dan border-bottom-color dari suatu elemen.

5 Value Properti borderBottom Style DOM pada HTML
Ilustrasi borderBottom HTML

Sebelum memahami lebih dalam materi tentang Mengatur Batas Bawah HTML Menggunakan borderBottom Style DOM, terlebih dahulu pelajari materi tentang: Mengatur Batas HTML Menggunakan Border Style DOM [klik], Mengatur Tampilan HTML Menggunakan backfaceVisibility DOM [klik], dan Mengatur Ukuran Latar Belakang HTML backgroundSize Style DOM [klik].

Sintak:
  • berfungsi untuk mengembalikan nilai properti borderBottom: object.style.borderBottom
  • berfungsi untuk mengatur properti borderBottom: object.style.borderBottom = "width style color|initial|inherit"

Parameter:
  • width: menampung ukuran lebar dari border bottom.
  • style: mengatur style border bottom.
  • color: mengatur warna dari border bottom.
  • initial: mengatur properti kenilai default.
  • inherit: menerima turunan properti dari elemen parent.

Return Value: berfungsi untuk mengembalikan nilai sebuah string yang merepresentasikan nilai lebar, style dan atau warna dari border bottom dari suatu elemen.

Baca Juga:

Contoh:

<!DOCTYPE html>

<html>

 

<head>

 

<title>

Properti Style borderBottom 

DOM

</title>

 

</head>

 

<body>

<center>

 

<h1 

style = "color:green;width:50%;

id = "sudo">

Blog Elfan

</h1>

 

<h2>

Properti Style borderBottom 

DOM

</h2>

 

<br>

 

<button 

type = "button" 

onclick = "BOns()">

Submit

</button>

 

<script>

function BOns() 

{

document.getElementById("sudo").style.borderBottom

= "thick solid green";

}

</script>

 

</center>

</body>

 

</html>

Output:

Blog Elfan

Properti Style borderBottom DOM




Contoh:

<!DOCTYPE html>

<html>

 

<head>

 

<title>

Properti Style borderBottom 

DOM

</title>

 

</head>

 

<body>

<center>

 

<h1 

style = "color:green;">

Blog Elfan

</h1>

 

<h2>

Properti Style borderBottom 

DOM

</h2>

 

<h3 

style = "border:2px solid red;width:50%;"

id = "sudo">

Blog TIK

</h3>

 

<br>

 

<button 

type = "button" 

onclick = "Dnns()">

Submit

</button>

 

<script>

function Dnns() 

{

document.getElementById("sudo").style.borderBottom

= "thick dotted green";

}

</script>

 

</center>

</body>

 

</html>

Output:

Blog Elfan

Properti Style borderBottom DOM

Blog TIK



Artikel ini didedikasikan kepada: Fauzan Fakturohman, Febri Ajianto, Fepti Artiani, Fianfigo Alrasyid Setiawan, dan Fidello Iqbaal Erfanda.

5 komentar untuk "Mengatur Batas Bawah HTML Menggunakan borderBottom Style DOM"

  1. Jenis browser apa saja yang dapat digunakan untuk mengaktifkan properti borderBottom Style DOM pada HTML?

    BalasHapus
    Balasan
    1. Berikut adalah beberapa jenis browser yang dapat digunakan untuk mengaktifkan properti borderBottom Style DOM pada HTML:
      1. Google Chrome 1.0
      2. Internet Explorer 4.0
      3. Firefox 1.0
      4. Opera 3.5
      5. Safari 1.0

      Hapus
  2. Apa fungsi dari properti borderBottom Style DOM pada HTML?

    BalasHapus
    Balasan
    1. Properti borderBottom Style DOM pada HTML digunakan untuk mengatur atau mengembalikan style batas bawah dari suatu elemen pada dokumen HTML.

      Hapus
    2. Properti borderBottom Style DOM pada HTML digunakan untuk mengatur atau mengembalikan tiga properti border-bottom yang terpisah, dalam bentuk singkatan.

      Dengan menggunakan properti borderBottom, pengembang web dapat mengatur atau mengembalikan satu atau lebih dari beberapa hal berikut:
      1. border-bottom-width
      2. border-bottom-style
      3. border-bottom-color

      Hapus

Hubungi admin melalui Wa : +62-896-2414-6106

Respon komentar 7 x 24 jam, mohon bersabar jika komentar tidak langsung dipublikasi atau mendapatkan balasan secara langsung.

Bantu admin meningkatkan kualitas blog dengan melaporkan berbagai permasalahan seperti typo, link bermasalah, dan lain sebagainya melalui kolom komentar.

- Ikatlah Ilmu dengan Memostingkannya -
- Big things start from small things -