Home > Web Front-end > HTML Tutorial > Setting font style in html

Setting font style in html

不言
Release: 2018-07-19 15:28:30
Original
10810 people have browsed it

The setting of font size and color in HTML is to encapsulate the text through tags, and then set the font style differently by changing the attributes of the tags. It can be completed with a few lines of code.

Example

<head>
        <title>这是一个html文件</title>       <!---head标签中进行相应的设置,这里设置了一个标题->
</head>
<body>
        <font size="5",color="red">php中文网1</font><br/>
        <font size="6",color="green">php中文网2</font><br/>
        <font size="7",color="blue">php中文网3</font><br/>
</body>
Copy after login

The corresponding title is set in the head, and the three lines of text are displayed in different ways. In real life, websites such as news media are not Each line of text is displayed in the same color or style (the entire webpage uses one format or color will be very monotonous), so to display different text in different formats, you need to use tags to process Wrap (encapsulate) the text, and set the corresponding style of the wrapped content by changing the attribute value of the label

The text label in htmlHTML web page font size setting

Detailed explanation of the method of setting font color in html and the method of using ps to obtain the accurate font color of html

The above is the detailed content of Setting font style in html. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template