Here is my HTML code
<p id="para" style="display:none;">This is a HTML code</p> <button type="button">Click Here to change the p tag Font Size</button>
I want to show the id para when clicking the button. How to do this using Javascript?
js show hidden html elements
<p id="para" style="display:none;">This is a HTML code</p>
<button type="button" onclick="show()">Click Here to show the hidden paragraph</button>
<script>
function show() {
var s = document.getElementById('para');
para.style.display = 'block';
}
</script>
Test your knowledge with interactive quizzes.
Prepare for interviews with curated question sets.
Ask your coding-related doubts and get answers.
Earn certifications to enhance your resume.
Hands-on projects to improve your skills.
Test your knowledge with interactive quizzes.
Prepare for interviews with curated question sets.
Add your technical blogs and read technical topics.
Earn certifications to enhance your resume.
Hands-on projects to improve your skills.