+ 22
How to use punctuation signs with HTML formatting tags? Should I include dots and comas into tags like <b> and <i>?
For example <p>This text is <b>bold</b>, <i>italic</i> and <u>underlined</u>.</p> Or <p>This text is <b>bold,</b> <i>italic</i> and <u>underlined.</u></p>
5 Respuestas
+ 19
Thank you good people for clearing my doubts. I want use mark up properly and I don't really care about beatification for now. I chose to ask about formatting tags because they have a visible effect on special characters. Sorry!
I will learn and use CSS to decouple my design from my markup. I promise!
+ 7
Adding to Sandra Meyer, I would avoid using <b>, <i>, and <u> as these are legacy tags that break convention from using HTML5 semantic tags.
Rather, you should consider using <strong> and <em> for bold and italics. Apply CSS to anything you want underlined.
This will help you keep your design decoupled from your markup.
+ 4
Beautification? I would leave them outside the formatting tags since a dot or a comma does not explain if it was italic or bold or underlined. I prefer leaving out special characters from formatting as far as possible in general.
<p><u>This</u>: is my favourite case to spare it out.</p>
+ 2
yes, we can add the dot and commas into tags like <b>,<i>,<u>,<del>,<sub>,<sub>,etc...
For example
<p>this is paragraph<p> here we want add a <b> or we want to text is bold then using <b> tag.
Using <b> tag:- <p>this is <b>bold</b>text</p>
We can use many more tags in one paragraph using commas shown in below:
<p>this is <b>bold</b> text, this text is <i>italic</i>,this text is <del>deleted</del>, this text is <ins>inserted</ins>. this is <u>underlined</u> text.</p>
- 1
I would suggest you to use html
Only for defining the format and using css for styling and decoration bcoz it is much easier and effective to use css.
If you don't know css much better then you can take up the css tutorial from here.