CSS tag source code
There is no problem with the p tag, but the b tag cannot be centered. What is the problem? The source code for solving
is as follows:
p {
color:blue;
font-size:4cm;
background-color:red;
border:2px solid blue;
text-align:center;
}
b
{
color:blue;
font-size:7cm;
background-color:red;
border:3px solid blue ;
text -align:center;
}
b>aaaaa b>
Reply to discussion (solution)
The B tag cannot be centered, it can only change the font style. Similar to this are FONT, I, STONG, etc., as well as SPAN. If you really want it to be centered, add a display:block;. Only then can he be centered.
Thanks, got it