HTML의 글꼴 태그는 웹페이지나 HTML 문서를 더욱 매력적으로 만드는 데 사용되는 가장 중요한 속성 중 하나입니다. 포함된 텍스트의 크기, 색상, 스타일을 변경하는 속성이 있습니다. 글꼴 태그를 사용하면 웹 페이지의 크기, 색상, 글꼴을 동일한 텍스트 형식으로 만들 수 있습니다. 이 태그는 주로 크기, 얼굴 또는 유형, 색상과 같은 세 가지 주요 속성에 대해 작동합니다. 글꼴 태그는 HTML 문서의 블록 텍스트의 일부 기능을 변경하기 위해 HTML의 인라인 요소로 작동합니다. 안에 포함된 텍스트입니다. 태그는 포함된 텍스트의 스타일을 정의하는 데 사용됩니다.
구문:
<font size=" " face=" " color=" "></font>
- 위의 구문 상태에서 글꼴 크기는 구문에 대한 속성으로 텍스트의 특정 크기를 설정하는 데 사용됩니다. 이 크기는 1부터 7까지의 숫자로 정의할 수 있습니다. 여기서 1은 가장 작은 텍스트이고 7은 가장 큰 텍스트 크기입니다. 글꼴 태그의 얼굴 속성은 HTML 문서의 글꼴 유형을 정의하는 데 사용되는 반면, 색상 속성은 포함된 텍스트의 특정 색상을 정의하는 데 사용됩니다.
- HTML 꼬리표. ..를 사용하여 정의합니다. HTML에 태그를 추가하세요.
<p> <font size="2" color="blue" face="Calibri"> </font> </p>
이 태그는 글로벌 속성과 이벤트 속성도 지원합니다. 또한 아래에 나열된 몇 가지 다른 속성도 지원합니다.
Attribute Name | Detail Description |
Size | This attribute is used to define a specific size for text in between 1 to 7. |
Face or type | This attribute is used to define the font type for the included text. |
Color | This attribute is used to show enclosed text in a different color. |
Weight | This attribute defines the boldness of the text of the font tag. |
글꼴 태그는 HTML 코드에서 두 가지 방법으로 사용할 수 있습니다. 첫 번째는 HTML을 통해 글꼴 태그와 해당 속성 값을 포함하는 것이고, 두 번째는 속성 값을 CSS 코드로 정의하는 것입니다. 둘 다 동일한 출력을 생성합니다. 속성 값 정의의 유일한 차이점입니다.
예시 #1
속성 값으로 글꼴 태그 정의:
html> <title>Font Tag in HTML</title> <h2 id="Example-of-Font-Tag-in-HTML">Example of Font Tag in HTML </h2> <p>General text without any Font tag attribute value</p> <p> <font>Text having normal font size and font face . Only changing font color </font> </p> <p> <font face="cursive">Text having different font face.</font> </p> <p> <font>Text with Increased font size having default font type. </font> </p>코드:
출력:
예시 #2
CSS를 통해 정의된 속성 값으로 글꼴 태그를 정의합니다.
<title>Font Tag in HTML</title> <h2 id="Example-of-Font-Tag-in-HTML-using-CSS">Example of Font Tag in HTML using CSS </h2> <p>Someone’s sitting in the shade today because someone plated a tree a long time ago. </p> <p style="color : lightgreen;"> Someone’s sitting in the shade today because someone plated a tree a long time ago. </p> <p style="font-family : Book Antiqua; color: blue; "> Someone’s sitting in the shade today because someone plated a tree a long time ago. </p> <p style="font size:3px;"> Someone’s sitting in the shade today because someone plated a tree a long time ago. </p>코드:
출력:
예시 #3
이 예에서는 속성 값이 size인 Font 태그를 사용하고 있으며, 이는 아래와 같이 가장 낮은 크기에서 가장 높은 크기까지 텍스트를 정의합니다.
<title>HTML font tag</title> <font size="1">People may doubt what you say, but they will believe what you do.</font><br> <br> <font size="2">People may doubt what you say, but they will believe what you do.</font><br> <br> <font size="3">People may doubt what you say, but they will believe what you do.</font><br> <br> <font size="4">People may doubt what you say, but they will believe what you do.</font><br> <br> <font size="5">People may doubt what you say, but they will believe what you do.</font><br> <br> <font size="6">People may doubt what you say, but they will believe what you do.</font><br><br> <font size="7">People may doubt what you say, but they will believe what you do.</font>HTML 코드:
출력:
예시 #4
<title>HTML tag with Font Type attribute</title> <font face="Comic sans MS"> Correct one fault at a time. Concentrate on the one fault you want to overcome.</font><br> <font face="Bernard MT Condensed" color="Red">Correct one fault at a time. Concentrate on the one fault you want to overcome. </font><br> <font face="Algerian">Correct one fault at a time. Concentrate on the one fault you want to overcome. </font><br> <font face="Book Antiqua" size="5">Correct one fault at a time. Concentrate on the one fault you want to overcome. </font><br> <font face="Aharoni"> Correct one fault at a time. Concentrate on the one fault you want to overcome.</font><br> <font face="AR BERKLEY">Correct one fault at a time. Concentrate on the one fault you want to overcome. </font><br>HTML 코드:
출력:
예시 #5
<title>HTML Font tag-Color </title> <font color="#cc0066"><b>It is terrible thing to see and have no vision</b></font><br> <font color="#66ff33"><b>Today's preparation </b></font> <br> <font color="#0000cc"><strong>Success depends on your backbone not your wishbone.</strong></font><br> <font color="#cc3300"><b>Patience makes lighter what sorrow may not heal</b></font> <br> <font color="#666600"><b>Hold fast to dreams, for if dreams die, life is broken winged bird that cannot fly </b></font> <br>HTML 코드:
출력:
- 결론
- 텍스트를 동일한 크기, 색상, 얼굴 형식으로 표시하는 데 사용됩니다. 글꼴 태그는 ..를 사용하여 표시됩니다. 태그.
위 내용은 HTML의 글꼴 태그의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

本篇文章带大家了解一下HTML(超文本标记语言),介绍一下HTML的本质,HTML文档的结构、HTML文档的基本标签和图像标签、列表、表格标签、媒体元素、表单,希望对大家有所帮助!

不算。html是一种用来告知浏览器如何组织页面的标记语言,而CSS是一种用来表现HTML或XML等文件样式的样式设计语言;html和css不具备很强的逻辑性和流程控制功能,缺乏灵活性,且html和css不能按照人类的设计对一件工作进行重复的循环,直至得到让人类满意的答案。

总结了一些web前端面试(笔试)题分享给大家,本篇文章就先给大家分享HTML部分的笔试题(附答案),大家可以自己做做,看看能答对几个!

HTML5中画布标签是“<canvas>”。canvas标签用于图形的绘制,它只是一个矩形的图形容器,绘制图形必须通过脚本(通常是JavaScript)来完成;开发者可利用多种js方法来在canvas中绘制路径、盒、圆、字符以及添加图像等。

在html中,document是文档对象的意思,代表浏览器窗口的文档;document对象是window对象的子对象,所以可通过“window.document”属性对其进行访问,每个载入浏览器的HTML文档都会成为Document对象。

html5废弃了dir列表标签。dir标签被用来定义目录列表,一般和li标签配合使用,在dir标签对中通过li标签来设置列表项,语法“<dir><li>列表项值</li>...</dir>”。HTML5已经不支持dir,可使用ul标签取代。

3种取消方法:1、给td元素添加“border:none”无边框样式即可,语法“td{border:none}”。2、给td元素添加“border:0”样式,语法“td{border:0;}”,将td边框的宽度设置为0即可。3、给td元素添加“border:transparent”样式,语法“td{border:transparent;}”,将td边框的颜色设置为透明即可。


핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

에디트플러스 중국어 크랙 버전
작은 크기, 구문 강조, 코드 프롬프트 기능을 지원하지 않음

SecList
SecLists는 최고의 보안 테스터의 동반자입니다. 보안 평가 시 자주 사용되는 다양한 유형의 목록을 한 곳에 모아 놓은 것입니다. SecLists는 보안 테스터에게 필요할 수 있는 모든 목록을 편리하게 제공하여 보안 테스트를 더욱 효율적이고 생산적으로 만드는 데 도움이 됩니다. 목록 유형에는 사용자 이름, 비밀번호, URL, 퍼징 페이로드, 민감한 데이터 패턴, 웹 셸 등이 포함됩니다. 테스터는 이 저장소를 새로운 테스트 시스템으로 간단히 가져올 수 있으며 필요한 모든 유형의 목록에 액세스할 수 있습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

Atom Editor Mac 버전 다운로드
가장 인기 있는 오픈 소스 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.
