Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we set style to title tag in header

Tags:

html

css

title

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>
like image 556
RK- Avatar asked Jul 11 '11 11:07

RK-


People also ask

Can you style title tags?

You can't style an actual title attribute It's not possible for a webpage to apply any style to the tooltip that the browser displays based on the title attribute. However, you can create something very similar using other attributes.

How do I make a title header in HTML?

HTML headings are defined with the <h1> to <h6> tags. <h1> defines the most important heading. <h6> defines the least important heading.


1 Answers

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").

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

You can, however, do something like:

head { display: block; }
title { display: block; font-size: 200%; font-weight: bold; }
like image 110
Quentin Avatar answered Sep 23 '22 03:09

Quentin