Glese Posted December 1, 2011 Share Posted December 1, 2011 A paragraph tag is used for paragraphs when making use of proper HTML. But which HTML tag is used for error messages which get echo'd out, when considering proper HTML? Quote Link to comment https://forums.phpfreaks.com/topic/252197-proper-tag-for-error-messages/ Share on other sites More sharing options...
nano Posted December 1, 2011 Share Posted December 1, 2011 Ultimately your error message will be a line of text and proper semantics would make it be a paragraph. You could use em inside a paragraph to stress the emphasis of the message but definitely a paragraph would be a win for me! Quote Link to comment https://forums.phpfreaks.com/topic/252197-proper-tag-for-error-messages/#findComment-1292993 Share on other sites More sharing options...
Glese Posted December 1, 2011 Author Share Posted December 1, 2011 Though I assume that a paragraph tag is not the right use since a line of text is not a paragraph, the use of em solely may be the proper way for this one. Quote Link to comment https://forums.phpfreaks.com/topic/252197-proper-tag-for-error-messages/#findComment-1293052 Share on other sites More sharing options...
nano Posted December 1, 2011 Share Posted December 1, 2011 I guess it all depends on where the error message is happening. Is it happening at the end of a body of text? Then you could use a paragraph tag. If its happening above an input, then I would use an inline element like strong, em, span etc. Good luck Quote Link to comment https://forums.phpfreaks.com/topic/252197-proper-tag-for-error-messages/#findComment-1293071 Share on other sites More sharing options...
Glese Posted December 1, 2011 Author Share Posted December 1, 2011 In the W3C examples they use a paragraph tag for a line of text as well, and there is also no alternative. Quote Link to comment https://forums.phpfreaks.com/topic/252197-proper-tag-for-error-messages/#findComment-1293073 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.