HTML and CSS Reference
In-Depth Information
Consider this example:
<form id=foo>
<input type=”text”>
...
</form>
<textarea form=foo></textarea>
The <input> is owned by the form foo , as it is contained within
it and does not have a form attribute overriding that ownership.
The <textarea> is outside the form, but is still owned by it, as its
form attribute points to the id of its form owner.
This gives a lot more flexibility with styling when you want
those elements to appear visually (and structurally) outside the
parent forms.
The form attribute is supported in Opera, Firefox, and Chrome.
As Safari shares a codebase with Chrome, it's likely to appear
there soon, too. IE has no support currently, and at the time of
writing, none has been announced for IE10.
<progress>, <meter> elements
The <progress> element is used to represent a “progress meter,”
to indicate the completion of a task—downloading a file, for
example. It has two attributes: max, which specifies how much
work the task requires in total, and value, which specifies how
much of the task has been completed. The units are arbitrary
and not specified:
<progress value=5 max=20>5</progress>
In supporting browsers, this is replaced with a progress meter
graphic ( Figure 3.11 ).
FIguRE 3.11 <progress> in
Chrome (left) and Opera (right).
Chrome's progress meter is
slightly animated; Opera's is
static.
<meter> is very similar (many have questioned whether there
needs to be two separate elements at all). The spec says that
<meter> “represents a scalar measurement within a known
range, or a fractional value; for example disk usage, the rel-
evance of a query result, or the fraction of a voting population
to have selected a particular candidate.”
 
 
Search WWH ::




Custom Search