html - Best Practice for Label-Input layout in ASP.NET -


What is the most commonly accepted way of grouping labels and inputs? Currently I am putting each pair in one device, but first I have a pair of & lt; P & gt; Also placed in . What are the better ways?

It depends on what I usually try to not group them, because it's just more Creates markup.

  & lt; Div id = "container" & gt; & Lt; Label = "username" & gt; Username & lt; / Label & gt; & Lt; Input type = "text" id = "user name" & gt; & Lt; Label = "password" & gt; Password & lt; / Labels & gt; & Lt; Input type = "article" id = "password" & gt; & Lt; / Div & gt;  

To avoid things that end in a row, the container style and label / input to fit.

  #container {width: 350px; } # Container labels {width: 100px; Margin-left: 5px; Text align: right; } # Container input {width: 225px; }  

If this is not possible, then I & lt; Div & gt; As & lt; / em> P & gt; 's for text ("paragraph")


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

kernel - How to create a "Block device" in Windows -