- HTML 教程
- HTML - 首頁
- HTML - 路線圖
- HTML - 簡介
- HTML - 歷史與演變
- HTML - 編輯器
- HTML - 基本標籤
- HTML - 元素
- HTML - 屬性
- HTML - 標題
- HTML - 段落
- HTML - 字型
- HTML - 塊
- HTML - 樣式表
- HTML - 格式化
- HTML - 引用
- HTML - 註釋
- HTML - 顏色
- HTML - 圖片
- HTML - 圖片地圖
- HTML - 內聯框架
- HTML - 短語元素
- HTML - 元標籤
- HTML - 類
- HTML - ID
- HTML - 背景
- HTML 表格
- HTML - 表格
- HTML - 表格標題和說明
- HTML - 表格樣式
- HTML - 表格 Colgroup
- HTML - 巢狀表格
- HTML 列表
- HTML - 列表
- HTML - 無序列表
- HTML - 有序列表
- HTML - 定義列表
- HTML 連結
- HTML - 文字連結
- HTML - 圖片連結
- HTML - 郵件連結
- HTML 顏色名稱和值
- HTML - 顏色名稱
- HTML - RGB
- HTML - HEX
- HTML - HSL
- HTML 表單
- HTML - 表單
- HTML - 表單屬性
- HTML - 表單控制元件
- HTML - 輸入屬性
- HTML 媒體
- HTML - 影片元素
- HTML - 音訊元素
- HTML - 嵌入多媒體
- HTML 頁首
- HTML - 頭元素
- HTML - 新增 Favicon
- HTML - Javascript
- HTML 佈局
- HTML - 佈局
- HTML - 佈局元素
- HTML - 使用 CSS 進行佈局
- HTML - 響應式設計
- HTML - 符號
- HTML - 表情符號
- HTML - 樣式指南
- HTML 圖形
- HTML - SVG
- HTML - Canvas
- HTML API
- HTML - 地理位置 API
- HTML - 拖放 API
- HTML - Web Workers API
- HTML - WebSocket
- HTML - Web 儲存
- HTML - 伺服器傳送事件
- HTML 其他
- HTML - 文件物件模型 (DOM)
- HTML - MathML
- HTML - 微資料
- HTML - IndexedDB
- HTML - Web 訊息傳遞
- HTML - Web CORS
- HTML - Web RTC
- HTML 演示
- HTML - 音訊播放器
- HTML - 影片播放器
- HTML - 網頁幻燈片
- HTML 工具
- HTML - Velocity Draw
- HTML - 二維碼
- HTML - Modernizer
- HTML - 驗證
- HTML - 顏色拾取器
- HTML 參考
- HTML - 速查表
- HTML - 標籤參考
- HTML - 屬性參考
- HTML - 事件參考
- HTML - 字型參考
- HTML - ASCII 碼
- ASCII 碼錶查詢
- HTML - 顏色名稱
- HTML - 實體
- MIME 媒體型別
- HTML - URL 編碼
- 語言 ISO 程式碼
- HTML - 字元編碼
- HTML - 已棄用標籤
- HTML 資源
- HTML - 快速指南
- HTML - 有用資源
- HTML - 顏色程式碼生成器
- HTML - 線上編輯器
HTML - <nobr> 標籤
HTML <nobr> 標籤用於指示瀏覽器不要換行指定的文字(例如瀏覽器視窗右側邊緣處通常發生的換行)。
它與 <wbr> 標籤一起使用,<wbr> 建議擴充套件瀏覽器何時可以在原本不可換行的文字序列中插入換行符。與 <br> 標籤不同,<br> 標籤始終導致換行,即使在 <nobr> 標記的段落內也是如此,<wbr> 標籤僅在放置在 <nobr> 標記的內容段落內時才有效,並且僅在當前行已擴充套件到瀏覽器的顯示視窗邊距之外時才會導致換行。
此標籤不再推薦,因為它已棄用並且在 HTML5 中不受支援。您可以改用 CSS 屬性。
語法
<nobr> Statement </nobr>
屬性
HTML nobr 標籤支援 HTML 的全域性屬性。
HTML nobr 標籤示例
以下示例將說明 nobr 標籤的用法。在何處、何時以及如何使用 nobr 標籤來繼續句子。
不換行語句
考慮以下示例,我們將對句子使用 <nobr> 標籤。
<!DOCTYPE html>
<html>
<head>
<title>HTML nobr Tag</title>
</head>
<body>
<h3>Normal Paragraph</h3>
<p>
This is a very long sequence of text that
is forced to be on a single line, even if
doing so causes the browser
to extend the document window beyond the
size of the viewing pane and the poor user
must scroll right to read the
entire line.
</p>
<h3>No Break Paragraph</h3>
<nobr>
This is a very long sequence of text that
is forced to be on a single line, even if
doing so causes the browser
to extend the document window beyond the
size of the viewing pane and the poor user
must scroll right to read the
entire line.
</nobr>
</body>
</html>
塊引用內的不換行語句
眾所周知,blockquote 元素會包裹文字,並且在出現不可換行句子時不允許滾動,它會強制換行,但使用 nobr 標籤後,它不會產生影響。
<!DOCTYPE html>
<html>
<head>
<title>HTML nobr Tag</title>
<style>
blockquote {
width: 200px;
}
</style>
</head>
<body>
<h3>No Break Paragpagh with Blockquote</h3>
<blockquote>
<nobr>
This is a very long sequence of text that
is forced to be on a single line, even if
doing so causes the browser
to extend the document window beyond the
size of the viewing pane and the poor user
must scroll right to read the
entire line.
</nobr>
</blockquote>
<blockquote>
This is a very long sequence of text that
is forced to be on a single line, even if
doing so causes the browser
to extend the document window beyond the
size of the viewing pane and the poor user
must scroll right to read the
entire line.
</blockquote>
</body>
</html>
支援的瀏覽器
| 標籤 | ![]() |
![]() |
![]() |
![]() |
![]() |
|---|---|---|---|---|---|
| nobr | 是 1.0 | 是 12.0 | 是 1.0 | 是 4.0 | 是 15.0 |
html_tags_reference.htm
廣告




