我们可以在标题中设置样式为标题标签 [英] Can we set style to title tag in header

查看:165
本文介绍了我们可以在标题中设置样式为标题标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以在html头中的标题中将样式设置为标题标签,如下所示。我尝试它没有工作..

Can we set style to title tag in header in html head as the following. I tried it did not work..

<title style="font-style:italic;"> My Title</title>


推荐答案

您可以将CSS应用于< title> 元素,但不包括 style 属性(因为它是所有元素,但BASE,BASEFONT,HEAD,HTML,META,PARAM,SCRIPT,STYLE,TITLE )。

You can apply CSS to the <title> element, but not though the style attribute (since it is for "All elements but BASE, BASEFONT, HEAD, HTML, META, PARAM, SCRIPT, STYLE, TITLE").

我不知道任何浏览器会应用CSS在浏览器标签或标题栏中呈现标题。

I'm not aware of any browser that will apply CSS for the rendering of the title in browser tabs or title bars though.

,然而,做一些像:

head { display: block; }
title { display: block; font-size: 200%; font-weight: bold; }

这篇关于我们可以在标题中设置样式为标题标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆