预排版标记<pre></pre>在网页中原封不动地都显示出来,实体符号

(1)有时候需要特殊的输出格式的时候,需要用到预排版标记符号<pre></pre>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>前端</title>
</head>
<body>
	<pre>
		这是  预排版标记
		这是  真的吗?
		 前面有空格
		&copy;版权
		&reg;注册商标
	</pre>
</body>
</html>

显示结果:

(2)实体符号的使用,一般是针对特殊的内容,比如内容里面有<div&css使用>,这里的<和>就需要使用&lt;和&gt;等代替。

如果需要特殊的乘法符号×或者÷,也可以用实体符号代替。

——不过,目前输入法已经相当方便。而且关于©等符号都可以直接输入法写出来,或者直接从其他地方复制粘贴出来一样可以用。所以目前实体符号在一般项目中基本不怎么使用。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
<?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>Client</class> <widget class="QDialog" name="Client"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>396</width> <height>196</height> </rect> </property> <property name="windowTitle"> <string>Dialog</string> </property> <widget class="QPushButton" name="cCancleBtn"> <property name="geometry"> <rect> <x>180</x> <y>150</y> <width>75</width> <height>23</height> </rect> </property> <property name="text"> <string>取消</string> </property> </widget> <widget class="QPushButton" name="cCloseBtn"> <property name="geometry"> <rect> <x>280</x> <y>150</y> <width>75</width> <height>23</height> </rect> </property> <property name="text"> <string>关闭</string> </property> </widget> <widget class="QLabel" name="cStatusLbl"> <property name="geometry"> <rect> <x>60</x> <y>110</y> <width>131</width> <height>16</height> </rect> </property> <property name="text"> <string>等待接收文件...</string> </property> </widget> <widget class="QLabel" name="label_2"> <property name="geometry"> <rect> <x>60</x> <y>60</y> <width>54</width> <height>12</height> </rect> </property> <property name="text"> <string>已完成</string> </property> </widget> <widget class="QProgressBar" name="progressBar"> <property name="geometry"> <rect> <x>110</x> <y>50</y> <width>271</width> <height>23</height> </rect> </property> <property name="value"> <number>0</number> </property> </widget> </widget> <resources/> <connections/> </ui>介绍界面设计的基本原则
最新发布
06-10

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值