HTML 中的預(yù)標(biāo)記
Sep 04, 2024 pm 04:25 PM
html
html5
HTML Tutorial
HTML Properties
HTML tags
Web 瀏覽器會(huì)忽略空格、換行符和其他文字格式字元。如果您想要某種格式,那麼每次都必須使用標(biāo)籤或?qū)傩?。它就是用?lái)消除這個(gè)缺點(diǎn)的。 Pre 標(biāo)籤用於保持文字格式不變。當(dāng)應(yīng)用 CSS 標(biāo)籤時(shí)它會(huì)發(fā)生變化。它顯示內(nèi)容的預(yù)先格式化文字。
文法:
HTML 有許多用於不同目的的標(biāo)籤。
範(fàn)例:
等
前置標(biāo)籤與其他 HTML 標(biāo)籤一樣有一個(gè)開始標(biāo)籤和一個(gè)結(jié)束標(biāo)籤。
<pre class="brush:php;toolbar:false"> content of web
上面的語(yǔ)法用於我們需要內(nèi)容的預(yù)先格式化文字的地方。
預(yù)標(biāo)記在 HTML 中如何運(yùn)作?
以下是 Pre 標(biāo)籤如何運(yùn)作的說(shuō)明:
1.在 Html 中使用 Pre 標(biāo)籤
代碼:
<!DOCTYPE> <html> <head> <title> using pre tag in html </title> </head> <body> <pre class="brush:php;toolbar:false"> The Web browser is ignored space,?? line breaks, and other formatting characters of text. If you wanted some?? format then tag or attribute must have used every time. Pre tag in HTML used to remove this drawback. Pre tag used to keep text format as it is. It is?? changed when CSS tags are applied. Pre tag in HTML shows the? preformatted text of the content.