html - Turning a long line of text into a paragraph with CSS? -


i need turn long line of text variable paragraph, how can in css?

if question right have javascript variable , want wrap in <p> element. goes this: <p><script type = "text/javascript>document.write(yourvariablename);</script></p> check http://www.w3schools.com/js/js_output.asp check out how can fill paragraph javascript variable instead of putting js code in html. should separate javascript html in situations clarity's sake

also think want use css style paragraph goes this:

`<style> p{   width:60%;   margin:0 auto; } </style>` 
  • example of 60% wide paragraph centered in it's parent

Comments