Adding the correct meta-information to the page

Any web page, when rendered, needs some meta-information. Although this information does not get rendered on the page, it's critical to render the page correctly. The following are some of the good practices for adding the meta-information:

  • Adding the right lang attribute to your html tag to comply with w3c's internationalization standards:
<html lang="en-US">
  • Declaring the correct charset to support special characters on your web page:
<meta charset="UTF-8">
  • Add the correct title and description tags to support search engine optimization:
<title>This is the page title</title>

<meta name="description" content="This is an example description.">
  • Add the appropriate base URL to avoid providing absolute URLs everywhere:
<base href="http://www.mywebsite.com" />
...
...
<img src="/cats.png" /> // relative to base
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.251.24