Firefox页面源中的红色字体 [英] Red font in Firefox Page Source

查看:106
本文介绍了Firefox页面源中的红色字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



但是,当我检查元描述时,我发现了一些元描述,右键单击Firefox并显示页面源代码,元描述标记为红色,这让我觉得我犯了一些错误。



红色是什么文本通常意味着什么?

解决方案

2个属性通常是元标记中最重要的一个:name和content



所以描述标签可能​​看起来像

 < meta name =descriptioncontent =我的网站描述> 

您可能忘记关闭双引号,或者在内容属性中使用引号包装字? p>

 < meta name =descriptioncontent =我的酷网站描述> 

在这种情况下,源代码查看器不会验证代码。

这也适用于单引号。如果您的元标记使用单引号,并且内容属性中有撇号。

 < meta name ='description'content = 'Bob的网站描述'> 


I have been messing around with my meta descriptions, trying to make them more unique by showing relevant data from the database.

But when I check the meta description by right-clicking in Firefox and showing the page source, the meta description tags is in red color, making me think I have made some kind of mistake.

What does the red text usually mean?

解决方案

2 attributes are usually the most important one in meta tags: name and content

so description tag may look like

<meta name="description" content="My site description">

You probably forgot to close the double quotes, or using quotes-wrapper word in content attribute ?

<meta name="description" content="My "cool" site description">

in which case source viewer does not validate the code.

This is also valid for single quotes. If your meta tag uses single quotes and there's an apostrophe inside content attribute..

<meta name='description' content='Bob's website description'>

这篇关于Firefox页面源中的红色字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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