Change Background Color
Change Font Size
Change Color
Align Text Center
Remove Underlines
html
<section>
<button type="button" onclick="change_bg()">Change Background Color</button>
<button type="button" onclick="change_font_size()">Change Font Size</button>
<button type="button" onclick="change_font_color()">Change Color</button>
<button type="button" onclick="change_align_center()">Align Text Center</button>
<a onclick="remove_underline()">Remove Underlines</a>
</section>
js
<script>
const change_bg = () => {
document.getElementById('main').style.backgroundColor = "#2d2d2d"
}
const change_font_size = () => {
document.getElementById('main').style.fontSize = "30px"
}
const change_font_color = () => {
document.querySelectorAll("button").forEach(button => button.style.color = "#b5e853");
}
const change_align_center = () => {
document.getElementById('main').style.textAlign = "center"
}
const remove_underline = () => {
document.querySelector('a').style.setProperty('border-bottom', 'none', 'important');
}
</script>