Is it any point to use html directly instead of label

T

Tony Johansson

Hello!

Instead of using a label control I can write the text directly in the web
page.

So is it any point to write text directly insted of using a label ?

//Tony
 
B

Brian Cryer

Tony Johansson said:
Hello!

Instead of using a label control I can write the text directly in the web
page.

So is it any point to write text directly insted of using a label ?

If the text never changes then you could use static text in the HTML, but if
the text does change then with a label:

1. its considerably easier to use than injecting plain text.

2. ots probably much easier for someone else (or you) to maintain the code
if you use a label rather than adding output directly.

whether or not the text every changes:

3. You can associate a label with another control, which helps screen
readers associate the text (caption) with the control it goes with.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top