0
Whitespace
As we know html ignore whitespace as it also do in <p>, but what if i don't want html to ignore for that <p> For example: I code a <p>Date: - - /--/-- Roll no. - - </p> Output: Date:--/--/-- Roll no. - - But i want the output should be same as i wrote between tag. And also the date and roll no. Should be in same line, how should i bring that space between them?
3 Respostas
+ 4
If you want to convert text with spacing to HTML format, try to use javascript
https://code.sololearn.com/WJ2CSqkq3LII/?ref=app
+ 2
You can write a non-breaking space using -- it's a spacebar which isn't removed.
<p>Date: --/--/-- Roll no. -- </p>
+ 1
Another thing you can experiment with is the <pre></pre> tag.