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

the <h4> html tag
the <h4> html tag

The <h4> 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 <h4> tag itself is considered to be a small repeating sub header for a webpage. By default it is displayed as bold version of the body text and smaller than the <h3> header. As with all h tags it is considered important for SEO.When text is put between the opening and closing <h4> tag it is displayed as a Small heading. Unlike <h1> a <h4> tag can be used multiple times on a webpage as its job is to be the heading for a web pages sub topics.

Basic Usage

<h4>Small header text</h4>
Any text between the opening and closing tag will be displayed as a small heading.

Advance Usage

It is possible to style and add functionality to the <h4> tag, this is done by adding an attribute to after the h4 in the opening <h4> tag
Attributes allowed for the <h4>tag include :-class, dir, id, lang, style and title.
In most cases class and id are used and its basic usage is shown below
<h4 id=”header”>Small header text</h4>
With all attributes there is a space after the initial h4 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 <h4> tag the class attribute is nearly always used over the id attribute although in practice it makes no difference.
The attribute style allows you to include css style information for a single <h4> 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

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

Final Thoughts

Touching on just the surface of the <h4> 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.

Case Study – Biznet

When six individuals came together to create Biznet, a local business networking group, it wasn’t long before the idea of a website was born. For such an exciting on-going project Websites by Mark were more than pleased to be invited to design, create and maintain the new system. By mixing strong visuals and practical flexibility has meant a site has been created that not only drives traffic from search engines, but also retain and converts visitors to members. As with any new group requirements, flexibility is often the key and the sites modular design allows for rapid and agile changes to be made within a very short timeframe. Like all Websites by Mark sites, listing on the major search engines happened in just a few days, and with its built-in features means SEO and SERP will naturally build and expand overtime. By using cutting edge prototyping and creation tools, the…

The cost of free website builders

With the daily rise of online services that promise to create and host a website for free. Is it good news for everyone, or a case of too good to be true? The birth of free From its inception people have constantly looked for cheaper and cheaper ways to access the internet and get the benefits of the digital life. From the start Companies like AOL offered discount packages for the masses to get online cheaply. Often the discounts came at a price like poor connection speeds and service but in an age where the internet was new and shiny, many people were happy to put up with most things just to get online. Businesses were quick to realise the power the internet and what it had to offer, but for many the perceived costs were just too much. It was not long before certain companies started to appear on…

The <kbd> html tag

Overview The <kbd> HTML tag is known as a phrase tag, it is mainly used to style text. By default it displays text in a fixed width font which is ideal for showing what is expected to be entered by a user. It works equally as well in table based layouts as well as CSS based ones. As with all phrase based HTML tags it can be used in situations where consistancy between browsers is difficalt to acheive in other ways. When text is put between the opening and closing <kbd> tag it is displayed as a keyboard text. Basic Usage <kbd>Some keyboard text in here</kbd> Any text between the opening and closing tag will be displayed as keyboard text. Advance Usage It is possible to style and add functionality to the <kbd> tag, this is done by adding an attribute to after the p in the opening <kbd> tag…

The Impact of the recent EMD update on search engine optimisation

EMD, or Exact Matched Domain, has always been an extremely important process for businesses as they first venture online. With the recent EMD update how should we be thinking as an industry about the way we manage accounts in the future? Put simply, an EMD is an exact keyword used within a domain for instance, if you were purchasing a website domain for an accountant in Bristol, you could use the domain bristolaccountants.co.uk. A brand domain on the other hand would use the name of the company instead. In the past, companies that were purchasing domain names for new websites would choose exact domains in relation to the keyword that they were specifically targeting, giving them an almost certain chance of appearing within the higher echelons of the Google search rankings. With the latest EMD updates things are changing and search engine optimisation professionals may have to tweak their approach.…

The <big> html tag

Overview Having the body copy in a web page all displayed as the same size is often normal, but there are times where by making certain parts of the copy slightly bigger, visually breaks up the text and makes it easier to read. In HTML the <big> tag can be used for this. The <big> tag is one of the original ways to format text and more recently CSS and other tags have reduced the importance of this tag. It is still a good tag when used correctly. When text is put between the opening and closing <big> tag it is displayed as big text. The <big> tag can be used multiple times on a webpage and can be nested inside other tags for dramatic effect. Basic Usage <big>Some big text</big> Any text between the opening and closing tag will be displayed as a large heading. Advance Usage It is…

© 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