On a webpage, frames are self-defined areas within the page. Each segment can contain its own HTML document. Frameset refers to the entirety of frames contained in a webpage. The content may be defined statically, alternating, or scrollable. The decisive factor is the independence of the individual segments.
For files which contain frames, the document type declaration must specify such.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
Furthermore, such a file does not include a body element. Following the <Head> is a <frame> or a whole <frameset>. A <noframes> area is possible and useful. It can even be seen by visitors, whose browser doesn’t support frames. It is helpful for search engines as well.
… <html> <head> <title> Displays the same for all frame content!</title> </head> <frameset cols=”250,*”> <frame src=”navigation.htm” name=Navigation”> <frame src=”start.htm” name=”content”> <noframes> <body> <h1>Welcome</h1> <p>We use frames, which are unfortunately not being displayed to you. <br> These pages can be reached on an alternate route:<br> <a href=”navigation.htm”>Navigation</a><br> <a href=”start.htm”>Start page</a><br> <!--other--></p> </body> <noframes> </frameset> </html>
The use of frames has some disadvantages. You have to take all aspects into consideration before utilizing frames.
Screen readers are generally able to interpret frames. However, a few factors must be taken into account when implementing frames.
One function of frames is the sensible, visual layout of the screen. It must be usable for output media which is one-dimensional and not visual. The number of frames plays a major role in this instance. If there are too many, tracing the page structure via a screen reader will be very difficult. Also for mobile devices, a high number of frames add to confusion.
There will also be an accessibility problem when document types other than HTML are being integrated into frames. If alt text is not added to a graphic in a frame, for example, it will not be detectable by a screen reader. An image in an HTML element, on the other hand, can be described by the ALT attribute as precise as you want.
The recording of frames is not a trivial matter for search engines. Normally a website is part of a URL. In frames, however, each frame has its own URL because they are individual HTML pages. By its own statement, Google tries to correct the content in frames. However, it is not assured that the frame will always be valued for the website on which the frame is integrated.
Since nowadays, many visitors surf the web via mobile terminals the corresponding disadvantage of frames is quite significant. If there are a lot of frames on a webpage and it is very difficult to navigate, you will leave the site quickly. The rate of conversions can therefore be adversely affected by frames because visiting the site is uncomfortable.
Generally, it is recommended to switch to alternate design options. CSS offers a large range of options, for example. Frames is no longer suitable. Responsive designs will in the future, play a much more significant role. In this case the layout automatically adjusts to the device being used.