问题是,每当您按照边距值应用边距空间时,都会给您输出。但是在标记中,
如果您通过保留任何空格来应用它,则它将被视为边距。因为pre是相反的行为,也就是说,正如您在pre标记中编写的那样,输出将相同。
注意:这些示例在引导程序中的作用相同。
示例1:如果要编写代码并将其打印为普通文本,则基本上使用pre标签的方法。
- 程序:
Pre tag usage GeeskforGeeks
A Computer Science Portal For Geeks
- 输出:
GeeskforGeeks A Computer Science Portal For Geeks
示例2:有时候,您已经写了一些代码并在pre标签内留出一些空格或空白,然后输出也给出了空白。
在pre标签内,您编写与输出相同的代码的方式。
- 程序:
Demo GeeksforGeeks This paragraph is on remove margin introduced in pre tag in bootstrap 4
- 输出:
GeeksforGeeks This paragraph is on remove margin introduced in pre tag in bootstrap 4