user892134
user892134

Reputation: 3214

Using span tags in meta description & title, for dual languages

I use both Persian characters and English in meta-description & title tag and I'm wondering if I can use span tags?

<meta name="description" content="The movie is Italy Italy - <span dir='rtl'>فیلم جدید</span>">

<title>The movie is Italy Italy - <span dir='rtl'>فیلم جدید</span></title>

The span tags define the direction e.g. <span dir='rtl'></span> for Persian characters.

Upvotes: 0

Views: 442

Answers (1)

Quentin
Quentin

Reputation: 944320

You cannot include elements inside attribute values.

The start-of-element special character < does not have its usual special meaning there and is treated as a literal less-than symbol.

The <title> element may not contain child elements either.

Upvotes: 1

Related Questions