Learn web development the right way, by standardizing your HTML.
For HTML to be proper and valid, there are tools out there that can check for it. Just check out W3C Markup Validation Service. Just copy your outputted code,and validate by direct input. To get your HTML output, in your browser (Chrome) simply right click anywhere on the document and click “View page source” or something similar. Select all of the text and put it in the Direct Input box on the Markup Validation Service Direct Input box. Click Check and watch the errors come to life.
This means that our HTML, although it renders in a browser, is not standardized. It needs a bit of massaging in order for search engines to consider it a valid document. This validator usually checks for things like missing closed html tags, doctype, etc.
Since the early days of the Internet, doctype was a standard in declaring your document an HTML document. Simply by placing this in the very beginning of your document, you can now validate against the HTML5 standard.
Something else you’ll need is to tell the rendering engines more information about your document. If it’s an HTML document, supply the HTML tag around your HTML code. Example:
<!DOCTYPE html> <html> ... </html>
Now you have am HTML document, but there’s more. A head and body tag have to be supplied. Whatever’s in the head doesn’t render, but tells the browser about additional resources attached to this document. Whatever’s in the body will be output visually to the body of the document.
<!DOCTYPE html> <html> <head> <title>My Test Site</title> </head> <body> ... </body> </html>
Notice the “title” element in the head. This tells our browser to render this title in the “tab” of your document. Can’t find it on the page? That’s because it’s in the tab.
If you attempt to validate now, you’ll see that everything works. No errors. This is a good thing.