Text typography – bold

Text layout–Bold

We can also use CSS styles to change the style of the text: bold, italic, underline, strikethrough, you can use the following code to set the text to be displayed in bold.

p span{font-weight:bold;}

As you can see here, if you want to set bold text, there is a separate css style to achieve, and you don’t need to use h1-h6 or strong tags to achieve bold style.

DOCTYPE HTML>

<html >
<head >
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title >Bold signtitle>
<style type="text/css">
p span
{font-weight:bold;}
a
{font-weight:bold; }
style>
head>
<body >
<h1 >Courageh1>
<p > In the third grade, I was still a <span class="stress"> As timid as a mousespan> The little girl, never dared to answer the questions raised by the teacher in class, for fear that the teacher would answer the wrong question<a href="http://www.imooc.com "> criticizea>Me. I have never had the courage to answer the questions raised by the teacher. I didn't have the courage to participate in the activities organized by the school. p> span>
<p > In the second semester of third grade, our class had an open class. The teacher asked a very simple question. Many students in the class raised their hands, even those whose grades were much worse than mine, also raised their hands. Then I said: "I'm coming, I'm coming." I looked around, but I didn't raise my hand. p> span>
body>
html>

p span{font-weight:bold;}

DOCTYPE HTML>

<html >
<head >
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title >Bold signtitle>
<style type="text/css">
p span
{font-weight:bold;}
a
{font-weight:bold; }
style>
head>
<body >
<h1 >Courageh1>
<p > In the third grade, I was still a <span class="stress"> As timid as a mousespan> The little girl, never dared to answer the questions raised by the teacher in class, for fear that the teacher would answer the wrong question<a href="http://www.imooc.com "> criticizea>Me. I have never had the courage to answer the questions raised by the teacher. I didn't have the courage to participate in the activities organized by the school. p> span>
<p > In the second semester of third grade, our class had an open class. The teacher asked a very simple question. Many students in the class raised their hands, even those whose grades were much worse than mine, also raised their hands. Then I said: "I'm coming, I'm coming." I looked around, but I didn't raise my hand. p> span>
body>
html>

Leave a Comment

Your email address will not be published.