the <h1> html tagWebsites by Mark - 7 Woodrush gardens, Carterton, Oxfordshire. OX18 1JE

the <h1> html tag
the <h1> html tag

The <h1> html tag

Overview

In HTML h tags stand for heading and this is split into 6 different h tags (h1, h2, h3, h4, h5 and h6). The <h1> tag itself is considered to be the main heading for a webpage. By default it is not only displayed bigger than the body and other h tags, but in seo is considered an important ranking factor.When text is put between the opening and closing <h1> tag it is displayed as the main heading. A <h1> tag is only meant to be used once on a webpage, but if you code a webpage with more than one <h1> tag it will still display corectly.

Basic Usage

<h1>Main header text</h1>
Any text between the opening and closing tag will be displayed as a main heading.

Advance Usage

It is possible to style and add functionality to the <h1> tag, this is done by adding an attribute to after the h1 in the opening <h1> tag
Attributes allowed for the <h1>tag include :-class, dir, id, lang, style and title.
In most cases class and id are used and its basic usage is shown below
<h1 id=”header”>Main header text</h1>
With all attributes there is a space after the initial h1 then the attribute name, then an equal’s sign and the identifier of the attribute in double quotes.
Both id and class attributes refer to CSS styling of the element and is either stored in the <head> of the webpage on in an external file.
With id this usually refers to a single instance on a page where as class usually refers to a repeating element on a page, it is for this reason for the <h1> tag the id attribute is nearly always used over the class attribute although in practice it makes no difference.
The attribute style allows you to include css style information for a single <h1> tag.
The dir attribute allows for left reading and right reading text, lang allows you to specify a language for the tag and title allows you to include extra information for a tag.
It is possible to attach scripts to tags, as well adding functionality to a webpage, these scripts tend to be written in Javascript and therefore outside the scope of this document

Examples

<h1>Main header text</h1> – basic usage example.
<h1 id=”header>Main header text</h1> – heading 1 which is styled by the id header.
<h1 class=”headerclass”> Main header text </h1> – heading 1 which is styled by the class headerclass.
<h1 id =”header” class=”headerclass”> Main header text </h1> – heading 1 which is styled by the class headerclass and the id header.
<h1 style="color:#F00">Main header text</h1> – heading 1 which has a custom colour of red.
<h1 dir="rtl">Main header text</h1> – heading 1 where the text reads from right to left.
<h1 lang="uk">Main header text</h1> – heading 1 where the language has been tagged as UK.
<h1 title="ptitle">Main header text</h1> – heading 1 where the tag has been titled ptitle.

Final Thoughts

Touching on just the surface of the <h1> HTML tag it is easy to see how versatile it is. To take full advantage of it an understanding of CSS is an advantage.

Our blog

Some random stories from our blog.

The <h2> html tag

Overview In HTML h tags stand for heading and this is split into 6 different h tags (h1, h2, h3, h4, h5 and h6). The <h2> tag itself is considered to be the main repeating heading for a webpage. By default it is displayed much larger than the body text but smaller than the main <h1> header. As with all h tags it is considered important for SEO.When text is put between the opening and closing <h2> tag it is displayed as a large heading. Unlike <h1> a <h2> tag can be used multiple times on a webpage as its job is to be the heading for a web pages main sub topics. Basic Usage <h2>Large header text</h2> Any text between the opening and closing tag will be displayed as a large heading. Advance Usage It is possible to style and add functionality to the <h2> tag, this is done…

Keyword use in document title

Overview In search engine optimisation it is well known that Google considers text used in the document title a good indication of what the web page is about. The document title of a webpage is contained within <title> html tag which itself must be included in the <head> part of the html page. If the title tag is malformed, search engines like Google may not read the page properly and not rank your page accordingly. History of the <title> tag The <title> tag in HTML is available in every version of HTML and is seen equally by all web browsers which support the html standard. It normally appears above the page in the browsers application bar. It can also used by Google as a title for your webpage in its listings. Therefore it is important not only to have your keywords to appear in the title tag, but presented in…

Top level domain of web site

Overview When most people think of larger websites it’s no coincidence that most people expect to see a .com Not only was .com was one of the first types of domain available it’s also known as a Top level domain. For years a .com often secured a good ranking due to its status but when country based domains (i.e. .co.uk) started to grow in popularity Search engine started to see this new level of domain potentially being more relevant for local search result. As a general rule a Top level domain is more relevant for those companies how have an international presence. The importance of Top level domain of web site Originally domain prices were very expensive and it’s only in recent years that the costs have come down to very affordable levels. This means domains are often bought now on the basis on what search engine optimisation benefits it…

Are social networks really social?

With websites like Facebook and Twitter constantly attracting new users on a day by day basis, there is no doubt how popular the social networks are. But in a world of increase reports of medical conditions like depression, do social networks indicate underlying issues with the world today? BC – before computers. There is little argument that computers have transformed most people’s daily lives. If you do not use a computer yourself, your life is certainly affected by them, either through technologies like mobile phones, or even the switch to digital TV and radio. But there are other factors at play, of which computers usually get the label. Up until recent history the world was a very big place, in fact a person’s world would represent a small part of the world as a whole. Go back one hundred years and people did not really travel, they worked within walking…

Age of web site

Overview The age of the website has been a ranking fact for many years and with the recent change of direction of Google, this would appear to becoming a more important factor again. The importance of the age of websites Google has always looked at ways to quantify the quality of information on every website it visits. The phrase ‘content is king’ is well known and it is for this reason Google places great deal of time and resources working out which sites information are the most accurate for the search terms people use to search on. Over the last decade the cost of domains and the hosting has become cheaper, and for those with no money there are options which allow for free webpages. A more recent trend off the back of this direction has been the blog for money generation. In short you can get paid for placing…

© 2011 Websites by Mark. Do not reproduce any part of this website without permission.
Email : mark@websitesbymark.co.uk - Phone : 07716 447228 / 01993 820005
Postal Address : 7 Woodrush Gardens, Carterton, Oxfordshire. OX18 1JE