Should I still use seamless attribute for iframe? - html

Should I still use "seamless" attribute inside <iframe> tag in html or is it dead in html5 (at least I saw one page that told this). So should I still learn it or its not worthy? Thanks for answers.

According to Can I Use, there are no current browsers that support the seamless attribute for iframes.
The seamless attribute makes an iframe's contents actually part of a
page, and adopts the styles from its hosting page. The attribute has
been removed from both the WHATWG and the W3C HTML5 specifications.

Related

<center> , <dir> tags have been expired in html5 but when i use them, work properly? [duplicate]

<!DOCTYPE html> specifies the page as html 5. But, when I used <center>, it can still center the content. Why <center> can still work in html 5 as I read from http://www.w3schools.com/tags/ that <center> is supposed to not work?
The tag is obsolete since HTML4. But it is still supported in some browsers even now. MDN advices to not use it
Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Use css text-align: center instead.
It's not part of the specs anymore but it's up to the browser whether or not they still support the tag. Most browsers will to make sure older code still works.
But, since it is deprecated you should not use it in new code. Go with CSS to get your stuff centered.
Browsers may still support it and at some point they will not. Take at look at this page to see if you can use or should use an html element, css property and more: http://caniuse.com/#search=center
Since HTML4, <center>, and other presentation tags (such as <blink>) has been deprecated from HTML specs, and removed in HTML5 specs.
Those tags should be replaced by other content tags (the most abstract one being <div>) in addition to CSS for the styling they did provide.
But since those tags don't lead to any security issue, (contrary to <frame>) they may still be supported by browsers for compatibility issues.
Even if today, google's main page still uses it, you should prefer to use an other content tag with proper CSS styling.

Why <center> can still work in html 5?

<!DOCTYPE html> specifies the page as html 5. But, when I used <center>, it can still center the content. Why <center> can still work in html 5 as I read from http://www.w3schools.com/tags/ that <center> is supposed to not work?
The tag is obsolete since HTML4. But it is still supported in some browsers even now. MDN advices to not use it
Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Use css text-align: center instead.
It's not part of the specs anymore but it's up to the browser whether or not they still support the tag. Most browsers will to make sure older code still works.
But, since it is deprecated you should not use it in new code. Go with CSS to get your stuff centered.
Browsers may still support it and at some point they will not. Take at look at this page to see if you can use or should use an html element, css property and more: http://caniuse.com/#search=center
Since HTML4, <center>, and other presentation tags (such as <blink>) has been deprecated from HTML specs, and removed in HTML5 specs.
Those tags should be replaced by other content tags (the most abstract one being <div>) in addition to CSS for the styling they did provide.
But since those tags don't lead to any security issue, (contrary to <frame>) they may still be supported by browsers for compatibility issues.
Even if today, google's main page still uses it, you should prefer to use an other content tag with proper CSS styling.

How is my HTML <image> element being interpreted as an <img> element? [duplicate]

I am writing an introductory HTML course. I remember discovering 9 years ago as I was learning HTML that both <img> and <image> worked as the tag for displaying images, at least in IE. Indeed, <image> still works in the latest versions of the 5 top browsers.
I realize that <image> is incorrect and will not validate with http://validator.w3.org. However, is anyone aware of a browser that will not display an image if <image> is used instead of <img>?
Furthermore, I assume the modern browsers display images created with the <image> tag simply because it is a common mistake that beginners make. Is this assumption correct?
Yes and no. As you point out <image> has been a synonym for <img> for a long time. I believe it was an early Netscape browser that first did this, possibly to compensate for user error, or possibly because there was dispute at the time whether the element should actually be called <image> or <img>.
Anyway, as pst points out, once it was implemented in a browser that dominated the market of the time, web pages came to rely on it. Its persistence is then down to commercial pressure on the browser manufacturers. If all the major browsers support it, then Browser A decides that although it supported it in Version V, it won't support it in version V+1, as soon as version V+1 is released, they get lots of messages saying "Site S is broken in your latest browser. You browser is rubbish. I'm going to switch to browser B".
The HTML5 parsing spec requires that the <image> tag is mapped to the img element at the tree construction stage, so there can never be any justification for using it.
I would be less concerned about browsers, than other HTML consumers, such as the lesser known search engines. I believe that the image for img synonym is not widely known, and the many such tools would therefore fail to pick up <image> as referencing an image resource.
They have different usages in SVGs. The image tag creates a specific element in an SVG and can not be replaced by the img tag.
Fiddle Example
I just finished debugging this problem, which I was committing, having not previously read the above answers.
While not full-blown browsers, an email client is often used as if it were a browser.
I discovered, the hard way, that the Android Gmail client, using naked HTML (with a default naked DTD specification), does exhibit this problem. It only responds to <img /> [i.e., not <image />]. gmail.com is fine with <image />, but not the Android gmail client.
While an email client isn't really a browser, I thought you might be interested anyway.
Indeed. Modern browsers will display code that is not valid in order to make sure that old websites still display correctly and slightly-invalid code doesn't screw up a page.
For example, forgetting to close a <tr> before you open a new one - all modern browsers will simply assume you closed it.
I'm not aware of a well-used, up-to-date browser that will fail to display an <image> tag, but will display an <img> tag.
Image is used by the DOM and is why it maps to the img tag in the html. Notice when you use background-image in css or drawImage in javascript, it is fully typed out.
Img is identified as an html tag referencing an image. A side note is that you can now use the <picture> tag besides <img> tag in the html.
The <picture> tag in HTML5 has/uses the properties that <audio> && <video> tags have. It helps remove issues with mobile device sizes and todays hi-res images.
What works well on desktop still renders properly when applied to a phone or table size screen.
See ~://quick over-view of picture vs. img

How to handle the browsers who don't support HTML5/CSS3

I have been looking into HTML5 and CSS3 and have been liking it quite a lot.
Got around the modernizr API, but am stuck at one point, and that leads to further confusions:
How will I write a code that caters to the situation of non-compatibility between browsers ?
This leads to the following confusions:
if I write the doctype as <!DOCTYPE HTML> and my page is accessed in IE6, then ho IE6 will handle the page?
If I try to include <video> tag and the page is again accessed by IE6/IE7IE8 (which don't support this tag), Then how am I supposed to be rolling back to flash for them? Should I use some JS to show/hide the content appropriately?
I would love to hear some thoughts of you guys.
If needed, please mark this post as a community wiki.
Thanks!
To answer your question directly,
You have to realize that the new <!DOCTYPE HTML> doctype is only used to trigger standard compliant mode in browsers. Traditionally, this (known as doctype switching) is the only thing the doctype is used for from the browser's perspective. So in short, nothing will happen change with respect to IE6 if you are using a doctype that already trigger standard mode.
You can use a script like Modernizr to do feature detection. This will allow you to use Flash as a fallback only in cases when its needed, as well as serve up the correct type of movie to browsers that support them. Even if you do not use the script, you can still look at its source to learn how this is done.
Alternatively, the <video> and <audio> tag specifically allow for fallback content to be embedded within them. This will means that you can simply wrap your Flash content with <video> tags, and if the browser does not support them it will simply use the fallback content.
Three things you need:
1. Check the list of supported features.
2. Detect HTML5 features
3. Use Graceful Degradation

Backward compatibility in HTML5 in mobile?

Does HTML5 support backward compatibility in mobile?
If the browser is not support HTML5 while run a html5 page in mobile browser, whether it will throw error when audio/video is not support or we able to customize the error/alternate code. Also design wise it supports rest of tags?
Thanks in advance,
Sri
As far as I am aware, unknown tags will be ignored.
I suggest you use a script such as modernizr to detect the support of the functionality you are looking to use. You can then code progressively, as you intended.
As my opinion..
I would suggest you to use JavaScript Hack.
As old browser would simply ignore new Tags used in HTML5 and style associated with it.
Use
document.createElement('HTML5tag');
where HTML5tag is the element/tag you want to use.
1. this will create an element and the style associated with that element will work properly.(even for old browser).
2. this should be used for every new html5 tag used by you in the head section before any style definition.