two labels in a div
I want to put two labels in a div...like below..
Label : some value <-----some gap-----> Label: another value.
can you please tell how to code this in HTML ?
If you mean IDs not labels, IDs apply to any HTML element. So you can apply one to the div as a whole and another to a paragraph etc...
<p id="p2">second paragraph.</p>
Labels are different, they apply to input fields on forms. They do not apply to divs.
Last edited by jedaisoul; 08-22-2013 at 05:58 AM.
>>>they apply to input fields on forms.
I am using input fields.
inside div I am putting two labels.
Then what is your problem??? The basic rules of using labels are:
1. Use label tags to enclose a single input field and the label text. E.g.
2. Enclosing multiple input fields with a label is wrong. E.g.
<label><input>label text<input>label text</label>
Does not work.
3. If you want to put the labels separate from the input fileds, use the <label for "name"> syntax. See here.
Last edited by jedaisoul; 08-23-2013 at 04:47 AM.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)