简体   繁体   中英

Bold Tags in HTML/CSS

I converted a file from PDF to HTML using an online converter with the goal of extracting bolded features from the HTML document. However, I cannot find any bold tags (HTML or CSS) on the HTML script but when I open the HTML file on a web browser, the bolded characters appear in bold.

Look at this example HTML excerpt for a bolded feature

<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>

The above HTML script outputs **1. My Laptop** **1. My Laptop**

Here is the HTML excerpt from an unbolded feature

<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>

The above script prints 2. Laptops are great tools in coding with the Command Line .

As you can see, they both share a lot of similar class tags. Howvever, here are the different tags they have:

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

These are the descriptions of the tags I obtained from the heading of the HTML file

**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;}

I code primarily in Python so I'm a newbie in HTML and CSS. I searched online for ways to identify bold tags on HTML/CSS files and my research narrowed it down to three ways:

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

As shown above, the tags font-weight shows normal for both bolded and unbolded characters

- **the <b> Element**

There are noHTML tags on the file

- **the <strong> Element**

There are noHTML tags on the file

Is there something else that I'm not looking at? I'm open to solutions across different programming languages (Python, JavaScript etc) and I look forward to answering any more questions you have.

Well some bold letter could be made by CSS through another page like bootstrap.

Well maybe there are some tags are filtered and put a style like in js check what contains the right thing to be bold.

Well it has to do with the converter as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM