My xhtml book says it’s a good practice to put "/" in elements with no content, such as hr, br, input type="button", etc.
Now the code editor says "Trailing slash on void elements has no effect", something like that.
Who’s right?
>Solution :
xhtml is an older standard which required closing of html tags but the current standard html5 does not require that anymore.
Your editor is following the html5 standard and therefore does not require the tags to be closed.
Your html file should be opening like this to see if it is following the html5 standard:
<!DOCTYPE html>
or like this if it is following the xhtml standard:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">