Skip to main content

learn html for intermediate :meta tag

Once upon a time, many eons ago, when the Internet was just a small number of cardboard boxes attached to each other with string, meta tags were the town criers of the Internet… erm… town.




Meta tags don’t do anything
to the content that is presented in the browser window, but they are used by the likes of search engines to catalogue information about the web page.
There is one meta tag which can be used as many times as you desire inside a head element and they can contain the attributes charset,name, http-equiv, and content.
When the name or http-equiv attribute is used, the content attribute is then used in conjunction with them to apply meta data itself.

Names

The name attribute can be anything you like. The most commonly used names are author,description, and keywords. author is used to explicitly state one of the HTML page’s authors and description is often used by search engines (such as Google) to display a description of a web page in its search results.









HTTP Equivalents

The http-equiv attribute can be used instead of the name attribute and will make an HTTP header, which is information sent to the server where the web page is held. The attributeshould rarely be used (although see charsetnote, below) but the value can be:
  • content-type, an encoding declaration, defining what character set is being used,
  • default-style, the preferred stylesheet from a selection of link or style elements,
  • or refresh, which defines how often (in seconds) a page automatically refreshes or if it should automatically redirect to another page. Not great for accessibility.










<head>
    <title>Air conditioners? YEAH conditioners!</title>
    <meta charset="utf-8">
    <meta http-equiv="refresh" content="3"><!--not recommended for sane people-->
    <meta name="description" content="This is my really, really, REALLY exciting web page about air conditioners">
    ...

Popular posts from this blog

learn advanced html Tables: Columns, Headers, and Footers

The Columns Strike Back Table rows tend to make table columns look rather stupid. They do all the work, as the table is built row by row, leaving the columns feeling quite rejected. Luckily for those eager columns though, the colgroup  and  col  tags have come to their rescue. These tags allow you to define the table columns and style them as desired, which is particularly useful if you want certain columns aligned or colored differently, as, without this, you would need to target individual cells.

learn advanced html : Accessible Forms

Labels Each form field should have its own explicit label . The  label  tag sorts this out, with a  for attribute that associates it to a  form  element: < form > < label for = "yourName" > Your Name </ label > < input name = "yourName" id = "yourName" > <!-- etc. -->