How to Set Image Height in HTML Using the <img>
Tag
html image Height tag
Image with Height
<img src="logo.jpg" height="400">
- This
sets the image height to 200 .
- The
width adjusts proportionally .
Syntax :-
Table width in pixel : <table border =1 height= 400>
html image Height tag
Example :-
<!Doctype html>
<html>
<body>
<table border= 1 height="400" >
<tr><td>
<img src="https://blogger.googleusercontent.com/img/b/
R29vZ2xl/AVvXsEh1E1OaKNSdVjTgeUNPTOydfZBZczSKbGcnedJq-A-RRs-LXAsghsog5Le-
RUXQq3_IAitSkCmybb9H0WVpdpoVyvcR2jYfxlatb_CE1xfUxMPj21UiONgeXdLbWZJ74WPtLoWsddy8bR-
BXd9JlXU4F7RWbxNBJ5x-_jkrQauMOFLifXQk90-holf9aUzF/w320-h268/logo.jpg">
</td>
</tr>
</table>
</body>
</html>
How to Set Image Height in HTML Using the <img> Tag
Explain Program
Step 1 ]
<!DOCTYPE html>
- document type declaration.
- browser help this is an HTML5 document.
<!DOCTYPE html>
- document type declaration.
- browser help this is an HTML5 document.
Step 2 ]
. <html> ... </html>
- root element of the HTML document.
- <html> tag is part of the web page.
. <html> ... </html>
- root element of the HTML document.
- <html> tag is part of the web page.
Step 3 ]
<body> ... </body>
<table border=1 height="400">
create a table
border =1 border 1 pixel around table.
height = "400" set table height to 400
Step 4]
<tr><td>.....</td></tr> one table row(<tr>) with one cell(<td>) <td> inside the image
<body> ... </body>
<table border=1 height="400">
create a table
border =1 border 1 pixel around table.
height = "400" set table height to 400
Step 4]
<tr><td>.....</td></tr>
one table row(<tr>) with one cell(<td>)
<td> inside the image
No comments:
Post a Comment