HTML code is a language used to create a website. It consists of various elements that are used to identify the elements of a web page. Search engines use this code to get information about a website.
HTML code defines the markup which is used to tag the content on your website and to display the results in the search engine result pages.
HTML stands for HyperText Markup Language and it represents markup language on web pages. It is written using HTML elements which have tags in angle brackets: < >. Search engine read HTML elements in order to determine the visual outline of the page. In this way parts of the text are tagged with adequate tags so that search engines can easily perceive the content of the page.
HTML elements are created with tags. So the tag <p> signifies a paragraph, <img> signifies image, etc. HTML elements usually consists of a start tag (for example <p>) and end tag ( for example </p>).
Some of the common guidelines with HTML code include the following (source: Google Webmaster Blog):
General Formatting Rules
Indent by 2 spaces at a time.
Use only lowercase.
HTML Style Rules
– Document Type
– HTML Validity
Use valid HTML where possible.
– Multimedia Fallback
Provide alternative contents for multimedia
HTML Formatting Rules
– General Formatting
Use a new line for every block, list, or table element, and indent every such child element..
You can check the validity of the HTML code used in the markup using different online tools. We suggest using this online tool: Markup Validation Service.
How to check validity of the markup?
Provide the URL of the page for which you want to check HTML code.
The tool will then analyze the web page in order to validate markup. You will get a list of results with highlighted errors and warnings, which need to be fixed in order to conduct successful validation of the document.
Additional information about this Markup Validation Service is available here:
This video illustrates the simple principles of HTML code: