Q:

what does forward slash do in html img tag

I'm learning html/css and following the tutorial @ W3Schools.com.
The code that I'm having trouble with is @ http://www.w3schools.com/css/tryit.asp?filename=trycss_vertical-align
In line 11 
<p>An <img src="w3schools_logo.gif" alt="W3Schools" width="270" height="50" /> image with a default alignment.</p> 

what does the / do just just before the > and after the height attribute?
I looked at http://www.w3schools.com/tags/tag_img.asp but it didn't mention /.

A:

Absolutely nothing, the trailing / is just ignored by the parser.
It is allowed on void tags (i.e. those without other tags/text content inside) by HTML5 specs to make the tag "self-closing", thus the markup valid XML. But it has no HTML-specific meaning.
Conversely, it is compulsory in xHTML for the same reason (making the markup valid XML).

