Yes, it makes a difference.
Basic attributes include: quotation marks around certain strings and semicolons at the end of a line to mark it as the end
It is important to always close things correctly, either by brackets or semicolons. If something is not closed right, PHP will issue an error and it may assume that the following line is incorrect when it is not.
Printing HTML code will be accepted by Web browsers while PHP will only be seen in code.
Web browsers will not be prepared to interpret the PHP code and may not open the page at all.