meta-tags

In <head>, which comes first: <meta> or <title>?

让人想犯罪 __ 提交于 2019-11-28 19:34:56
问题 In head, which comes first: meta or title? I was reading this: This [meta] tag should be the first in the HEAD section, because the server will process the text above as ASCII with no specific format that it only known once the tag is analyzed. http://www.xul.fr/en/html5/html.php Does the standard specify the order? Are there disadvantages in either order? 回答1: As all of the other answers have already indicated, it usually doesn't matter. Here's a bit more about when it matters and why. First

How is the meta viewport tag used, and what does it do?

橙三吉。 提交于 2019-11-28 18:42:05
What browsers support this meta tag? How do i use it? Does this mean it will solve all my mobile resizing problems? If anyone could answer this it would be a great help to newbies learning <meta="viewport"> The viewport browser support is a little bit across the board. I'll point you to the Quirksmode page for viewport browser support for the full details. You use the viewport meta tag like any other meta tag. Put the code block straight up in the <head> . Pretty much, but again, a little bit of a mouthful to say here. I'd advise reading some articles , reading the W3 mobile best practices for

Meta-refresh doesn't work?

一曲冷凌霜 提交于 2019-11-28 18:32:44
问题 I have a page using something along the lines of <meta http-equiv="refresh" content="0;url=http://example.com/" /> but for certain users on a certain workstation this doesn't work. The is in IE. Is there something wrong with cookies or a setting somewhere which would cause this to fail? I never heard of such a thing. 回答1: The problem is that when IE sees this: <meta http-equiv="refresh" content="0;http://www.example.com" /> it expects the contents attribute to contain a number. The only time

Is it still valid to use IE=edge,chrome=1?

强颜欢笑 提交于 2019-11-28 17:18:48
问题 I read Chrome Frame closed last month, I thus tried to understand what it'd mean for the X-UA tag and after 3 hours of research I still didn't find the answer I'm looking for, my question is the following : Is it still valid nowdays to use IE=edge,chrome=1 or should I stop at IE-edge from now on ? Or what would be the best pratice to do regarding X-UA, should it be avoided ? 回答1: <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> serves two purposes. IE=edge : specifies that IE

Media Queries firing at wrong width

烂漫一生 提交于 2019-11-28 17:10:59
I am building a responsive page and the media queries are firing at the wrong width size. I am using Chrome. @media screen and (max-width: 1200px) { .logo-pic { display: none; } } For example, this rule works it just fires at wrong size. This rule fires at 1320px and not 1200px. I have the meta tag for html in place. It seems to be firing the media query 100 or so pixel wider than it normall should. <meta name="viewport" content="width=device-width, initial-scale=1"> I checked the previous responsive site I made and those breakpoints are firing correctly. I've tested the browser on different

Submitting object to Facebook via open graph doesn't work, but then works after testing the URL in Facebook's object debugger?

老子叫甜甜 提交于 2019-11-28 17:04:40
I want to allow a user of my web-app to be able to post multiple objects to their timeline from one page (main_page). I already have the user's access token stored. Tags on page I am trying to submit, the url is page_url: <meta property="fb:app_id" content="my_app_id" /> <meta property="og:type" content="my_namespace:my_object" /> <meta property="og:title" content="some string" /> <meta property="og:description" content="some other string" /> <meta property="og:image" content="some_image_url" /> <meta property="og:locale" content="en_US" /> <meta property="og:url" content="page_url" /> Rails

HTML meta tag for content language

喜欢而已 提交于 2019-11-28 16:38:02
What is the difference between the following two HTML meta tags, for specifying spanish web page content: <meta name="language" content="Spanish"> and <meta http-equiv="content-language" content="es"> <meta name="language" content="Spanish"> This isn't defined in any specification (including the HTML5 draft ) <meta http-equiv="content-language" content="es"> This is a poor man's version of a real HTTP header and should really be expressed in the headers. For example: Content-language: es Content-type: text/html;charset=UTF-8 It says that the document is intended for Spanish language speakers

What are the important meta tags I must put in my website? [closed]

 ̄綄美尐妖づ 提交于 2019-11-28 14:44:12
问题 There seems to be huge number of meta tags you can set. I'm guessing that some of them are more important than others. What are the most important metatags to supply and why? Do I even need meta tags? (looking at the stackoverflow homepage there are none) 回答1: I realize this question is old, but it's still a top google hit, so I thought I would give an updated answer that includes popular social media sites. I generally have four groups of meta info: Regular Meta Info - used by search engines

The desciption meta tag is not showing in a Google organic listing

佐手、 提交于 2019-11-28 14:34:46
I have realised the desciption meta tag is not showing in a Google organic listing on a new site. Please see below the meta tags. I have always used these tags before without a problem. I have double checked the code and researched the correct syntax but can't see what is wrong. I also used a spider simulator at Webconfes and it saw the description tag. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <base href="//www.executivehealthsydney.com.au/"/> <title>Complete Health Checks forBbusy Executives by Doctors</title>

Getting meta title and description

妖精的绣舞 提交于 2019-11-28 13:47:36
I am having trouble getting the meta description/title from this specific site . Here is some code: $file = file('http://www.thegooddrugsguide.com/lsd/index.htm'); $file = implode("",$file); if (preg_match('/<title>(.*?)<\/title>/is',$file,$t)) $title = $t[1]; It works with other sites, but not with the site in question. What could be the problem? This should work fine: $doc = new DOMDocument; $doc->loadHTMLFile('http://example.com'); $title = $doc->getElementsByTagName('title'); $title = $title[0]; $metas = $doc->getElementsByTagName('meta'); foreach ($metas as $meta) { if (strtolower($meta-