簡體   English   中英

HTML/CSS 中的粗體標簽

[英]Bold Tags in HTML/CSS

我使用在線轉換器將文件從 PDF 轉換為 HTML,目的是從 HTML 文檔中提取粗體特征。 但是,我在 HTML 腳本上找不到任何粗體標記(HTML 或 CSS),但是當我在 Web 瀏覽器上打開 HTML 文件時,粗體字符以粗體顯示。

查看此示例 HTML 摘錄以了解粗體功能

<div class="t m0 x3 h3 y9 ff2 fs0 fc0 sc0 ls11 ws0">1.<span class="ls0"> <span class="_ _1"> </span><span class="ls1">My Laptop</span> </span></div>

上面的 HTML 腳本輸出**1. My Laptop** **1. My Laptop**

這是一個非粗體功能的 HTML 摘錄

<div class="t m0 x3 h4 y15 ff3 fs0 fc0 sc0 ls11 ws0">2<span class="ls0"> <span class="_ _2"> </span><span class="ls8">Laptops <span class="ls4">are</span></span> <span class="ls13">grea</span>t <span class="ls7">tools </span> <span class="lsd">in codi<span class="_ _3"></span>ng with<span class="_ _3"></span> the <span class="ls0">C<span class="ls1f">ommand </span>L</span>ine.  <span class="ls0"> </span></span></span></div>

上面的腳本打印2. Laptops are great tools in coding with the Command Line

如您所見,它們都共享許多相似的類標簽。 但是,以下是它們具有的不同標簽:

(h3, h4), (y9, y15), (ff2, ff3)

這些是我從 HTML 文件的標題中獲得的標簽的描述

**h3:** .h3{height:29.275313px;} Looks like a tag for height
**h4:** .h4{height:28.940625px;} Looks like a tag for height

**y9:** .y9{bottom:891.946667pt;} Looks like a tag that measures the vertical position of the character on the HTML page
**y15:** .y15{bottom:655.928000px;} Looks like a tag that measures the vertical position of the character on the HTML page


**ff2:** .ff2{font-family:ff2;line-height:0.904297;font-style:normal;font-weight:normal;visibility:visible;} 
**ff3:** .ff3{font-family:ff3;line-height:0.895996;font-style:normal;font-weight:normal;visibility:visible;}

我主要用 Python 編寫代碼,所以我是 HTML 和 CSS 的新手。 我在網上搜索了在 HTML/CSS 文件上識別粗體標簽的方法,我的研究將其縮小為三種方式:

- **font-weight: bold|bolder**

如上所示,標簽 font-weight 對於粗體和非粗體字符都顯示正常

- **the <b> Element**

沒有文件上的 HTML 標簽

- **the <strong> Element**

沒有文件上的 HTML 標簽

還有什么我沒有看的東西嗎? 我對跨不同編程語言(Python、JavaScript 等)的解決方案持開放態度,我期待回答您的更多問題。

好吧,CSS 可以通過另一個頁面(如 bootstrap)制作一些粗體字母。

好吧,也許有一些標簽被過濾了,並在 js 中放置了一個樣式,檢查哪些包含正確的內容要加粗。

好吧,它也與轉換器有關。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM