Skip to content

Commit

Permalink
Create bimaexzz.js
Browse files Browse the repository at this point in the history
  • Loading branch information
bimaexz authored Oct 28, 2022
1 parent dfb93f5 commit 63f2514
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions bimaexzz.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const judul = document.getElementById('judul');
judul.style.fontWeight = 800;
judul.style.fontSize = '50px';
judul.style.color = 'white';
judul.style.backgroundColor = 'grey';

const a = document.getElementById('a');
a.style.color = 'red';

const paragraf1 = document.getElementsByTagName('p');
for (i=0; i<paragraf1.length; i++){
paragraf1[i].style.backgroundColor = 'lightgreen';
}

const anchor = document.getElementsByTagName('a');
anchor[0].style.backgroundColor = 'lightgrey';

const paragraf2 = document.getElementsByClassName('p2');
paragraf2[0].style.fontSize = '100px';

const paragraf22 = document.querySelector ('section#a p.p2');
paragraf22.innerHTML ='Bima';

const list = document.querySelectorAll
('section#b ul li:nth-child(2)');
list[0].style.color ='red';
list[0].innerHTML = 'Bima';
list[0].style.backgroundColor ='lightgrey';

const section1 = document.querySelectorAll('#a a');
section1[0].style.fontSize = '100px'

0 comments on commit 63f2514

Please sign in to comment.