Very Short Question and Answers - vspace and hspace
Ans:
The vspace attribute adds vertical space above and below the image, separating it from surrounding content.
Ans:
The hspace attribute controls the amount of horizontal space on the left and right sides of the image.
Ans:
No, both vspace and hspace are deprecated in HTML5 and should not be used in modern web development.
Ans:
In modern HTML, CSS margin properties are used to add space around images.
Ans:
<img src="tree.jpg" alt="Tree" vspace="20" width="200" />
Ans:
You use the attribute as
<img src="image.jpg" alt="Description" hspace="30" />.
Ans:
vspace="20" adds 20 pixels of blank space above and below the image.
Ans:
hspace="30" adds 30 pixels of blank space to the left and right sides of the image.
Ans:
<img src="flower.jpg" alt="Flower" style="margin:20px 30px;" width="200" />
Ans:
Because they are deprecated in HTML5 and may not be supported in the future; CSS should be used instead.
Ans:
10 pixels of space will be added above and below, and 15 pixels of space will be added to the left and right of the image.
Ans:
The hspace attribute.
Ans:
No, vspace and hspace only accept pixel values for spacing.
Ans:
Use style="margin:40px;" in the <img> tag.
Ans:
vspace adds space only above and below the image.
Ans:
'Deprecated' means the attribute is outdated and should not be used, as it may not be supported in future versions.
Ans:
<img src="book.jpg" alt="Book" hspace="30" width="150" align="left" />
Ans:
The vspace attribute.
Ans:
Because understanding legacy HTML attributes is important for historical knowledge and exam purposes.
Ans:
vspace adds vertical space (above and below) and hspace adds horizontal space (left and right) around an image.