Jump to content

Rules for text in html?


SuperBlue

Recommended Posts

Maybe question is rather simble, but lately while working on my new website i got in doubt about how to present text in my documents.

 

Well, the way i've done it in the past was by simply enclose the text in either divs or spans, the validator dosent come up with errors this way. However if i read in Guides on html they allways use the P tag. Why is that exactly?, and if that is indeed the correct way, how could i change the default behavior so the text dosent break more then one line, or dosent at all?

 

The way i've done it in the past, dosent "feel right", also when im beautifying my code it dosent look right simply to have text not enclosed by other tags then the div itself, and it dosent "feel right", becourse i use spaces to beautify with, and the text itself contains spaces... So clearly theres somthing i've missed  :-\

 

anyway i've tryed a few times to find an explanation on this, but dident find any on google.

 

 

Link to comment
Share on other sites

on screen appearance should be controlled by css if you use a standards compliant method. as Andy says semantics is the answer...

 

If you 'beautification' relates to the on-screen rendering then instead of spaces you should apply padding or margin to your link...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.