I am just curious really and hope that someone can reveal the method in the madness of the W3C.
What is the reason for not supporting this element in the latest HTML5 standard?
I know the element was deprecated in HTML 4.01, but I don’t understand why.
It seemed perfectly logical to me, you have a a paragraph of text and just wish to change the font, or to identify, lines or words from it using the font element, now the only way to do the job is with the span element.
It seems strange to me that there are so many ways to create a block of text, using div, section, or just paragraph, but to wrap a few keywords or any inline content, there is only the span element.
And really, one little element can’t do any harm, so why not still support it?
Thank you,
Luke
John
12.3k12 gold badges93 silver badges161 bronze badges
asked Sep 25, 2013 at 9:17
![]()
Luke T O’BrienLuke T O’Brien
2,4753 gold badges25 silver badges36 bronze badges
5
In short:
HTML is a markup language. Use it to mark up the different sections of your content using the most semantically accurate element.
CSS is used for styling purposes, such as changing colors, sizes, fonts, etc.
The <font> element was used for styling, not marking up a section of your content. That’s why it’s deprecated, along with other out-of-place elements such as <center>.
John
12.3k12 gold badges93 silver badges161 bronze badges
answered Sep 25, 2013 at 9:34
Nils KasperssonNils Kaspersson
8,3963 gold badges26 silver badges29 bronze badges
14
HTML tags describe their contents. To mark up your HTML you should use CSS. In such way you can create different skins for the same information. Since the font tag serves purely visual purpose, it has no place in HTML; it does not describe the contents.
With describing contents I mean: «This is paragraph of text / this is a time / this is a link to another page / this is the title of this article / this is a list of related terms / this is a table containing test results» etc.
Read up on semantic HTML, it will hopefully make things more clear for you.
answered Sep 25, 2013 at 9:22
Marijke LuttekesMarijke Luttekes
1,2341 gold badge12 silver badges27 bronze badges
2
There are lots of ways to wrap inline content, but only one of them has no semantics associated with it (span). Of the list of block wrappers you gave, only div has no semantics associated with it.
The old font element has no semantics associated with it, so it contributes as much as span and can be replaced by span.
The idea is that you pick the element that describes why the text looks different (<em>, <cite>, <dfn>, etc) and then apply CSS to make it look the way you want.
And really, one little tag can’t do any harm, so why not still support it?
It is supported, the rendering rules describe how browsers should handle the font element. This is for backwards compatibility. Authors are just forbidden from using it (since it does no good).
answered Sep 25, 2013 at 9:28
QuentinQuentin
891k122 gold badges1190 silver badges1309 bronze badges
I am just curious really and hope that someone can reveal the method in the madness of the W3C.
What is the reason for not supporting this element in the latest HTML5 standard?
I know the element was deprecated in HTML 4.01, but I don’t understand why.
It seemed perfectly logical to me, you have a a paragraph of text and just wish to change the font, or to identify, lines or words from it using the font element, now the only way to do the job is with the span element.
It seems strange to me that there are so many ways to create a block of text, using div, section, or just paragraph, but to wrap a few keywords or any inline content, there is only the span element.
And really, one little element can’t do any harm, so why not still support it?
Thank you,
Luke
John
12.3k12 gold badges93 silver badges161 bronze badges
asked Sep 25, 2013 at 9:17
![]()
Luke T O’BrienLuke T O’Brien
2,4753 gold badges25 silver badges36 bronze badges
5
In short:
HTML is a markup language. Use it to mark up the different sections of your content using the most semantically accurate element.
CSS is used for styling purposes, such as changing colors, sizes, fonts, etc.
The <font> element was used for styling, not marking up a section of your content. That’s why it’s deprecated, along with other out-of-place elements such as <center>.
John
12.3k12 gold badges93 silver badges161 bronze badges
answered Sep 25, 2013 at 9:34
Nils KasperssonNils Kaspersson
8,3963 gold badges26 silver badges29 bronze badges
14
HTML tags describe their contents. To mark up your HTML you should use CSS. In such way you can create different skins for the same information. Since the font tag serves purely visual purpose, it has no place in HTML; it does not describe the contents.
With describing contents I mean: «This is paragraph of text / this is a time / this is a link to another page / this is the title of this article / this is a list of related terms / this is a table containing test results» etc.
Read up on semantic HTML, it will hopefully make things more clear for you.
answered Sep 25, 2013 at 9:22
Marijke LuttekesMarijke Luttekes
1,2341 gold badge12 silver badges27 bronze badges
2
There are lots of ways to wrap inline content, but only one of them has no semantics associated with it (span). Of the list of block wrappers you gave, only div has no semantics associated with it.
The old font element has no semantics associated with it, so it contributes as much as span and can be replaced by span.
The idea is that you pick the element that describes why the text looks different (<em>, <cite>, <dfn>, etc) and then apply CSS to make it look the way you want.
And really, one little tag can’t do any harm, so why not still support it?
It is supported, the rendering rules describe how browsers should handle the font element. This is for backwards compatibility. Authors are just forbidden from using it (since it does no good).
answered Sep 25, 2013 at 9:28
QuentinQuentin
891k122 gold badges1190 silver badges1309 bronze badges
|
0 / 0 / 0 Регистрация: 22.03.2016 Сообщений: 3 |
|
|
1 |
|
|
22.03.2016, 12:22. Показов 2803. Ответов 4
Добрый день,не могли бы подсказать как исправить ошибку в коде.уже много всего прочитал но так и не получается. выделяя font color
__________________
0 |
|
413 / 378 / 220 Регистрация: 18.07.2014 Сообщений: 1,259 |
|
|
22.03.2016, 13:22 |
2 |
|
rybkid, не нужно много всего читать, нужно прочитать на что ругается валидатор
0 |
|
0 / 0 / 0 Регистрация: 22.03.2016 Сообщений: 3 |
|
|
25.03.2016, 10:52 [ТС] |
3 |
|
просто не могу понять где то менять,сайт построен на какой то странной cms и в админке написано:
0 |
|
413 / 378 / 220 Регистрация: 18.07.2014 Сообщений: 1,259 |
|
|
28.03.2016, 11:59 |
4 |
|
rybkid, попытайтесь выяснить, на какой именно цмс написан сайт
0 |
|
0 / 0 / 0 Регистрация: 22.03.2016 Сообщений: 3 |
|
|
22.04.2016, 11:21 [ТС] |
5 |
|
Добрый день,вот скрин админки. Миниатюры
0 |
I have this html:
<div class="a"><font size="40"><font
color="black">A</font></font></div>
The thing is, I can’t make the font-size bigger. No matter what I do, it just stays at a certain size. If I increase 40 to 50, for example, it makes no difference.
I then tried:
.a {font-size: 50px;}
Nothing.
Page ref: https://adsler.co.uk/about-adsler/
asked May 7, 2019 at 13:36
7
The <font> tag is no longer supported and does not work in HTML5.
Remove it and set the style in the <style> tag in the <head> or in the linked stylesheet:
<style>
.a {
font-size: 40px;
color: black;
}
</style>
Alternatively, set the style directly on the element inline:
<div style="font-size: 40px; color: black">A</div>
answered May 7, 2019 at 13:46
![]()
4
As of HTML5, the Font-tag is deprecated. Instead you should style all of your elements with css:
<div class="a"> A </div>
<style>
.a {
font-size: 40px;
color: black;
}
</style>
answered May 7, 2019 at 13:43
1
You should use CSS style for div tag :-
<div style="font-size:50px; color: black;">A</div>
answered May 7, 2019 at 13:44
91StarSky91StarSky
4823 silver badges10 bronze badges
font tag supports «size» attribute to be a number between 1 to 7
you could use the custom css on font tag with «style» attribute like
<font style="font-size:40px;">A</font>
or you could remove the font tag and apply the style attribute to div tag
<div style="font-size:40px;">A</div>
answered May 7, 2019 at 13:51
![]()
Yatin GaikwadYatin Gaikwad
1,1101 gold badge12 silver badges22 bronze badges
I have this html:
<div class="a"><font size="40"><font
color="black">A</font></font></div>
The thing is, I can’t make the font-size bigger. No matter what I do, it just stays at a certain size. If I increase 40 to 50, for example, it makes no difference.
I then tried:
.a {font-size: 50px;}
Nothing.
Page ref: https://adsler.co.uk/about-adsler/
asked May 7, 2019 at 13:36
7
The <font> tag is no longer supported and does not work in HTML5.
Remove it and set the style in the <style> tag in the <head> or in the linked stylesheet:
<style>
.a {
font-size: 40px;
color: black;
}
</style>
Alternatively, set the style directly on the element inline:
<div style="font-size: 40px; color: black">A</div>
answered May 7, 2019 at 13:46
![]()
4
As of HTML5, the Font-tag is deprecated. Instead you should style all of your elements with css:
<div class="a"> A </div>
<style>
.a {
font-size: 40px;
color: black;
}
</style>
answered May 7, 2019 at 13:43
1
You should use CSS style for div tag :-
<div style="font-size:50px; color: black;">A</div>
answered May 7, 2019 at 13:44
91StarSky91StarSky
4823 silver badges10 bronze badges
font tag supports «size» attribute to be a number between 1 to 7
you could use the custom css on font tag with «style» attribute like
<font style="font-size:40px;">A</font>
or you could remove the font tag and apply the style attribute to div tag
<div style="font-size:40px;">A</div>
answered May 7, 2019 at 13:51
![]()
Yatin GaikwadYatin Gaikwad
1,1101 gold badge12 silver badges22 bronze badges
HTML является одним из основополагающих строительных блоков Интернета. Но так же, как и методы веб-дизайна меняются со временем, также меняется и код, который мы используем. По мере развития HTML какая-то часть его старой разметки устарела, а какая-то была перепрофилирована.
dynsrcатрибутом. Оба атрибута теперь устарели.Многие из HTML-тегов и атрибуты были заменены более эффективным стилем CSS. Браузеры ещё поддерживают устаревший код, но использовать его не советуем, т.к. в один прекрасный момент поддержка прекратится и вы получите проблему.