html-head

How to create an Angular directive in the <head> section of a document?

放肆的年华 提交于 2019-12-01 14:58:49
问题 I am new to angular.js . I am trying to create a directive to add some title and meta tags in the <head> section of html documents, but I am having some trouble. My index.html document is as following: <!DOCTYPE html> <html ng-app="myApp"> <head> <meta charset="UTF-8"> <base href="/"> <seo-title></seo-title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.1/angular.min.js"></script> <script src="https://code.angularjs.org/1.4.1/angular-route.min.js"></script> <script src="

Necessary to add link tag for favicon.ico?

梦想与她 提交于 2019-11-27 17:00:31
Are there any modern browsers that won't detect the favicon.ico automatically? Is there any reason to add the link tag for favicon.ico? <link rel="shortcut icon" href="/favicon.ico"> My guess is that it's only necessary to include it in the HTML document if you decide to go with GIF or PNG... To choose a different location or file type (e.g. PNG or SVG ) for the favicon: One reason can be that you want to have the icon in a specific location, perhaps in the images folder or something alike. For example: <link rel="icon" href="_/img/favicon.png"> This diferent location may even be a CDN, just

Necessary to add link tag for favicon.ico?

痴心易碎 提交于 2019-11-26 18:49:24
问题 Are there any modern browsers that won't detect the favicon.ico automatically? Is there any reason to add the link tag for favicon.ico? <link rel="shortcut icon" href="/favicon.ico"> My guess is that it's only necessary to include it in the HTML document if you decide to go with GIF or PNG... 回答1: To choose a different location or file type (e.g. PNG or SVG) for the favicon: One reason can be that you want to have the icon in a specific location, perhaps in the images folder or something

Does <STYLE> have to be in the <HEAD> of an HTML document?

前提是你 提交于 2019-11-26 01:37:36
Strictly speaking, do style tags need to be inside the head of an HTML document? The 4.01 standard implies that, but it's not explicitly stated: The STYLE element allows authors to put style sheet rules in the head of the document. HTML permits any number of STYLE elements in the HEAD section of a document. I say "strictly speaking" because I have an app that puts style elements inside the body, and all the browsers I've tested with seem to use the style elements. I'm just wondering if that's actually legal. Esteban Küber style is supposed to be included only on the head of the document.

Does <STYLE> have to be in the <HEAD> of an HTML document?

允我心安 提交于 2019-11-26 00:59:41
问题 Strictly speaking, do style tags need to be inside the head of an HTML document? The 4.01 standard implies that, but it\'s not explicitly stated: The STYLE element allows authors to put style sheet rules in the head of the document. HTML permits any number of STYLE elements in the HEAD section of a document. I say \"strictly speaking\" because I have an app that puts style elements inside the body, and all the browsers I\'ve tested with seem to use the style elements. I\'m just wondering if

Redirect from an HTML page

非 Y 不嫁゛ 提交于 2019-11-25 21:49:45
问题 Is it possible to set up a basic HTML page to redirect to another page on load? 回答1: Try using: <meta http-equiv="refresh" content="0; url=http://example.com/" /> Note: Place it in the head section. Additionally for older browsers if you add a quick link in case it doesn't refresh correctly: <p><a href="http://example.com/">Redirect</a></p> Will appear as Redirect This will still allow you to get to where you're going with an additional click. 回答2: I would use both meta , and JavaScript code