More advice for the full screen mode.
Sivut toimivat riittävän hyvin MS IE 4.0+, Opera 5.x+, Netscape 6.0+/ vast. Mozilla ja Konqueror 3.x selaimilla. Yleisesti ottaen sivut toimivat parhaiten uusimmilla Opera selaimilla. Sivujen toimivuus vanhemmissa selaimissa on heikko, erityisesti Netscape 4.x kohdalla.

I list below all topic groups, which I have done according to subjects, which they handle. You can return to this topic group by using this menu and the link Table of topic groups on the top of the each page.
Table of topic groupsFront page of CSS-guideGuide pages2. How to put CSS into Web pages > Style sheets inside style attributes (section 2/3)

Style sheets inside style attributes

If style sheets have been used inside elements, thy have been defined inside style attributes. In this connection declaration blocks don't have curly brackets. Below is an example:

<TD style="border:1px solid #660033">

This method doesn't differ essential from HTML 3.2 attributes. This method is called also as using inline style sheets or just inline styles (this is a little bit problematic term, read the Footnote 1[S][Pw]). If you want to exchange afterwards CSS, which are inside elements, you must search them among other code as you must do in HTML 3.2 level attributes! This kinds style sheets could be called as element-level style sheets. Most elements can get them, but they can't be defined in HTML to the root element, because it can get in HTML 4.01 only language attributes.

Even if that style attributes are limited to element level, the usage of the style attributes have some some basic level differences to presentational HTML 3.2 attributes:

  1. CSS-definitions can be much richer. HTML 3.2 presentational attributes (there are also other kind of attributes) can have only single value at a time but CSS doesn't have this limitation.
  2. You can give to a certain element a limited quantity of attributes. This limitation is not in CSS-properties. They are not element dependent like HTML 3.2 attributes, but in certain circumstances some properties are discarded (I handle these kinds of situations in other pages in individual connections).

Even if style attributes are the less powerful way to use CSS-properties they are however useful for example in situations, when the author wants to define into a certain element the absolute position. Following properties give to the image 120 pixel position from the top of the HTML-document. You can add more properties into the style attribute or use HTML 3.2 presentational attributes in order to give more adjuncts to the element ([M][S][Pw]):

<IMG src="../Kuvat/Css/omakuvaIso.gif" style="position:absolute; top:120px;">

Use style attributes with consideration! Think first, if you really need them or could you still use some other method.

Browser-specific notes:.

  1. Netscape browsers don't tolerate curly brackets inside style attributes (this matter is not however so simple and I handle problems in the Footnote 2[S][Pw]).

  2. Direct CSS can be read by all CSS-capable browsers and that's why it is non-recommended way to use CSS. Netscape 4.x has serious problems and it should have an own CSS. I handle in a separate page[S][Pw], how to pass it reasonably.


Footnote 1. The problem of the term inline style sheets (or rather inline styles) is that the word inline is commonly used as opposite to the word block. Both describe the natural behavior of elements. If the term could be consistent with this use of the word inline, inline style sheets should be used only as inline-level elements, for example from the element EM. It could fit best to the element SPAN, which is particularly designed to inline-level style and language passing.

In this case the term inline styles the word inline doesn't describe the behaviour of elements. It means simple style sheets, which are inside the document body in style attributes (style sheets are embedded to the source code). When I asked about this matter, I got the following answer:

Yes, inline has two meanings: something can be inline in the source or in the output... An inline style is a style that is embedded in the source, an inline element is an element that will look like a phrase in a line on output... Most people talk about "inline style" or "style attribute",...

The expression inline styles sounds relative good. Indeed for the people like me, who don't speak English as their native language, the different usage of the word inline might cause confusion. I write also about element-level style sheets.


Footnote 2. There has been disagreement what it is the correct syntax of declarations, which are inside style attributes. Some applications accept style="{}", which tells much better, that style attributes includes embedded declarations. But this is against the normal HTML attribute syntax, and Netscape accepts only style="". According to David Baron this is correct. But if I think about this matter deeper, I disagree. It is only an agreement, that the dominating syntax is normal HTML attribute syntax. Today style-attribute has the same kind of syntax as so-called javascript, which use also ";" as the separation mark like onClick="uusikkunaa(); if(browser) nayta(10, 'b')".