

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to add the height of the element in HTML?
Use the height attribute in HTML to set the height of an element. You can use the attribute with the following elements − <canvas>, <embed>, <img>, <input>, <video>, etc.
Example
You can try to run the following code to implement height attribute in HTML −
<!DOCTYPE HTML> <html> <body> <video width = "300" height = "200" controls autoplay> <source src = "/html5/foo.ogg" type = "video/ogg" /> <source src = "/html5/foo.mp4" type = "video/mp4" /> Your browser does not support the video element. </video> </body> </html>
- Related Questions & Answers
- How to add the value of the element in HTML?
- How to get the height of an element using jQuery?
- How to set the height of an element with JavaScript?
- Change the height of element using CSS
- How to get the height of a div element using jQuery?
- How to set the maximum height of an element with JavaScript?
- How to set the minimum height of an element with JavaScript?
- How to make the web page height to fit screen height with HTML?
- How to add an address element in HTML?
- How to set the name of the element in HTML?
- Change the width and height of element using CSS
- How do we add the maximum number of characters allowed in an element in HTML?
- How to add many Event Handlers to the same element with JavaScript HTML DOM?
- How to add the maximum value to HTML?
- Set the width of the element in HTML
Advertisements