Hot answers tagged

6

In (X)HTML5, the a element’s href attribute […] must have a value that is a valid URL potentially surrounded by spaces. As the anchor suggests, it may contain leading and trailing spaces. The linked section makes clear that these spaces will be stripped: […] the user agent must remove all space characters that are at the start or end of the string […]...


4

The XHTML doctype is for XHTML web pages and, unless you are serving your page as application/xhtml+xml, it ain't XHTML. I'm betting you're not doing that. Writing HTML as XHTML is called "tag soup" and browsers will ignore what you wrote and do the best they can with it cause it won't make sense to the HTML parser. So that's a waste of time. I've ...


4

This means we will have some pages in HTML 5 and others in XHTML at the same moment. Having some pages in your site marked up with HTML5 and some in XHTML should not be a factor in your site's ranking since search engines crawl and index pages individually.


3

Just changing from XHTML to HTML 5 won't be an issue or make a difference. If you change your markup you will affect your rankings as semantic markup is a ranking factor. So if your markup is different it stands to reason your rankings may be different. No one can say if it will be helpful or harmful as we have no idea what changes you will be making or if ...


3

There is clearly no problem about it. Every request returns one document that has its own independent doctype. This is not affecting any other sites. According to https://stackoverflow.com/questions/10380346/css-styles-not-applied-properly-if-use-doctype different doctypes could define different default CSS property values of specific (meta) elements. So ...


3

HTML5 uses better markups that are not only easier to use but also is slightly better for SEO purposes, while its not amazing for SEO as Google yets to favor HTML5 websites it does better from Rich Markups and the ASIDE elements and Articles which helps Google establish what the page is about and maybe elements which have nothing to do with the page itself. ...


2

Do you mean DOCTYPE or do you really mean mime type? And, why do you prefer sending html to IE and xhtml to everyone else? Seems like an unnecessary complication. As a side note, why would anyone whose audience is the general public prefer serving XHTML over HTML? I should probably ask that in another thread if I really want an answer...


2

No, CSS doesn't affect SEO in any way.


2

Some other useful links, when deciding what CSS3 features you might want to use: http://caniuse.com/ (gives a good breakdown of what elements and selectors are usable across which platforms) http://css3please.com/ (an in-page-editable playground to mess with CSS3 features, this also gives some advice about which techniques and features are supported by ...


2

Usually you set mime-types for different types of "files" which are passed from your server to the receiver. In Apache you would add the following lines to your .htaccess file (in your root directory): AddType application/xhtml+xml .xhtml .xht You'd add the file's extension to whatever you'd want to transfer with that mimetype. Be it .xhtml, .xht, .html, ....


2

You need to familiarize yourself with DOC-TYPE markups. At the moment your attempting to use both HTML5 and XHTML which is not possible, its one or other. So at the moment you using: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> For HTML5 it should look like: <!DOCTYPE html> If you want it to ...


2

At the beginning, forget about the differences between XHTML, HTML4, HTML5 (markup), CSS2, CSS3 (styling), etc. Think about it like learning to build a house. In the beginning, you don't really need to understand the differences between gas heating systems vs electric vs solar, or what style of house is currently en vogue (ranch, multi-story, igloo-shaped). ...


2

It sounds like you're trying to create a Polyglot Document (and I sound like Clippy!) Essentially, that's an HTML5 document which is also valid XML. Basically, you just need to carry on as normal, writing valid HTML5. You will need to close any self-closing elements (e.g. <br> becomes <br />, same for img, source, hr, etc) and make sure all ...


2

Doctype and Microdata shouldn't create many problems. It's possible that it will throw IE into 'quirks' mode, but you will probably be fine. The problem with HTML5 tags like header and article are that older browsers don't recognize them as block level elements. So if you are using them in that way at all you may be in for some layout surprises. There are ...


2

You are correct, some older browsers like Internet Explorer 8 provide little to no support for HTML5 elements and other HTML5 features. There are online sites which can help you identify what's missing in IE 8 and older browsers, such as this one. There are also open-source projects like this often-cited one, aimed at improving HTML5 compatibility for IE 8: ...


2

There is no reason to follow the advice to keep a low number of links per page. Here is a visualization of the number of links on the homepages of top 98 webpages. Very few have less than 100, and many have 500 or more. If the top websites don't limit the number of links, then you don't have to either. Google's "100 links per page" advice is very old. ...


2

Just think about usability. Is your website well structured? Is all parts of your website easily accessible? Is page hierarchy logical and user friendly? Do you unnecessarily sitewide link to the same pages of your site? Does your site contain over excessive links on the page? Are your anchors descriptive for visitors and not for SEO? Tick all the right ...


2

If you mouse over the doctype you'll see that Firefox is rendering the page in "Almost standard mode". The DOCTYPEs that will trigger "almost standards" mode are those which contain: The public identifier "-//W3C//DTD XHTML 1.0 Transitional//EN" The public identifier "-//W3C//DTD XHTML 1.0 Frameset//EN" The public identifier "-//W3C//DTD ...


2

Unfortunately, your question didn’t include the errors you saw in the SDTT. Both snippets don’t show any warnings/errors now. So I’m not sure what exactly the issue was, but I want to clear something up in case there is a misunderstanding. Void elements The base element is a void element. Void elements don’t have an end tag, and so they can’t have any ...


2

Please, check Joey's answer on this: If your HTML is going to be regularly processed by automated tools instead of being read by humans, then you might want to use XHTML because of its more strict structure and being XML it's more easy to parse (from an application standpoint. Not that XML is inherently easy to parse, though). You can see all the ...


1

There is a lot of problems with Gedcom file conversion and web hosting. Have you checked your export file sources to see if codes match original source codes? Export done with UT-8 coding? Tried HTML export opposed to XHTML? Some software is proprietary and will only work on your machine and the proprietary server. You mentioned in the uploaded file ...


1

... it's showing as Content-Type: text/plain. Providing the file has validated successfully as XHTML/XML then (assuming you are on an Apache web server) you can try adding the following to the .htaccess file in the document root (or your server config, if you have access): AddType application/xhtml+xml xhtml (I assume all modern browsers understand XHTML ...


1

It's completely OK to have HTML tags inside anchor tags when defining a clickable image in your webpage. The HTML code will be similar to the following: <a href="http://example.com/path/to/link"><img src="someimage.jpg"></a> My suggestion is to use only HTML tags that define output text or help define output text such as the IMG tag, and ...


1

Note: This snippet on its own is not doing what you want because you didn’t specify any vocabulary. Here in my answer I’ll use the schema: prefix as specified in the RDFa Core Initial Context. (Not needed if you have a vocab on a parent element.) The author property takes one name. And it expects a Person (or Organization) type as value. And it doesn’t make ...


1

The data-* attributes are defined for (X)HTML5 only. The Microdata attributes (itemscope, itemprop, …) are defined for (X)HTML5 only. So when you switch to (X)HTML5, you can use both of these. If you want to keep using XHTML 1.0, you could use class instead of data-* attributes, and RDFa instead of Microdata (which requires adjusting your DOCTYPE).


1

Generally google or other crawl engines won't execute your js code and so they don't load your meta tags. But still there are ways to make your site seo friendly. There are two ways I know. One is Hijax (http://en.wikipedia.org/wiki/Hijax) and other is the html snapshot method using 'escaped url fragments' or some other method. In my opinion, hijax is ...


1

I'm not quite sure what you imagine "become a handicap" would look like, but the overall concept here is pretty simple. Technology changes pretty fast in the website development world. Whether you target the bleeding edge, the most broadly adapted standards or even if your target is legacy browsers the bucket of available technology tricks is quickly ...


1

Not to be off-topic, but is this a dynamically-generated site? If so, why are you wanting to have people scrape data from your markup, rather than returning a format that is more suited to service-reading software? It just sounds to me like the same purpose could be served by serving JSON or actual XML or RSS to clients requesting those feeds, and then you ...


1

If you are starting a new project using HTML5 which should also be supported in older browsers, the best option is to use Initializr - http://www.initializr.com/ It uses HTML5 Boilerplate at the backend, and adds a few options of its own to give you a template which you can deploy on your own site. It includes the Javascript libraries (like HTML Shiv or ...


Only top voted, non community-wiki answers of a minimum length are eligible