Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
So say I have a website that was built using tables and specifically width tags (Awful I know). According to w3schools that website isn't using HTML5 because the width is no longer supported. My question is would I need to change that code, because it wouldn't be supported by modern day browsers? Or perhaps because it won't be supported later down the road?
That all depends on what browsers you want your site to support. However, as a practical matter most browsers are going to be backward compatible for a while. Most modern browsers still support very early versions of HTML going back to the mid 90's.
That said, it is always a good idea to make sure you are setting the doctype tag on the page appropriately so the browser knows what it is getting and can accommodate it.
There never was a width tag in HTML. For some elements, the width attribute can be used. There is no change in browser support to it; HTML5 drafts require browsers to support legacy attributes even though those drafts declare them as obsolete. W3schools is unreliable and misleading; see w3fools.
As a general rule I would say no. I haven't read the spec or anything but it sounds like the width tag is being depreciated on tables?
If this site was intended to last 6-7 years without major changes then maybe you might want to futureproof it but it seems rather unlikely that the browser venders will break support any time soon. Too much of the web would be broken.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I've stumbled about the element on w3schools but as far as caniuse.com told me, the element isn't supported by IE, Opera Mini and the UC Browser for Android.
Would I be better by going with a <main> element or should I stick with a <div id="main">?
caniuse.com told me, the element isn't supported by IE, Opera Mini and the UC Browser for Android
That isn't what it says.
It says "Partial support" and:
Partial support refers to missing the default styling, as technically the elements are considered "unknown". This is easily taken care of by manually setting the default display value for each tag
So if main has the appropriate semantics, then use it. Just make sure to explicitly set display: block.
If the browser doesn't expose the semantics of using main then it will have no semantics, which is the same as a div.
From the looks of it I wouldn't worry about compatibility, unless you are trying to support IE 8 and below.. You can cover all your bases by using both <main role="main"> per MDN
The element is widely supported. For Internet Explorer 11 and
below, it is suggested that an ARIA role of "main" be added to the
element to ensure it is accessible (screen readers like JAWS,
used in combination with older versions of Internet Explorer, will be
able to understand the semantic meaning of the element once
this role attribute is included).
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am in the process of building a web-site with html and css.
Till now I viewed the code through my browser (explorer 10) and adjusted it in a way that it would look good on the browser. (Moved objects around, determine their size etc.)
Sadly, I recently discovered a bitter truth - the fact that everything look good and is in position in explorer 10 on my pc doesn't say anything about how it will look in different browsers or even different versions of the same browser.
I tried it on Chrome, explorer 11 on my laptop and tried to change the screen resolution- in all those cases the page didn't display as expected.
[Objects were misplaced, the cover photo didn't cover all the screen , etc.]
What properties in the css are responsible for compatibility in display between browsers, versions and resolution?
Those who have experience in web-developing - can you recommend a platform that makes the developing process easier? (maybe takes care of cross browsers compatibility and so on).
Something that is better than just starting from an empty html file.
You have to edit lots of css cross browsers depending on how they each render the results.
Read these two articles,
CSS Mistakes
Cross browser coding
This is the reason a great deal of web developers are using well known, mobile ready style libraries. Your question is broad, however, there is no reason why a web developer cannot point you in the right direction.
Take a look at Twitter Bootstrap. It's a mobile ready CSS/Script library which you can reference via CDN or you can install the library in your application. Not only is it mobile ready, but it is cross browser compliant. You will most likely be pleased with your results using Twitter Bootstrap styles.
http://getbootstrap.com/getting-started/
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am designing a website which has to reach old and new browsers. With this in mind should I program in HTML5? Currently the website is only in html 5. The question is: Is it stupid in my case to use HTML5, should I use a "switch"(is this even possible) to redirect old browsers?
The question is, what aspects of html5 do you plan to use?
If your website is mostly static html & javascript, no audio and no embedded video, then I would say it use HTML4.
If your not using any tags in html5 dont rush it, no
If you're trying to reach a broad audience, I wouldn't necessarily jump into HTML 5 yet. It's still not supported widely or consistently enough to rely on it. However, there are several resources available if you want to give it a shot.
When Can I Use... should be a big help. It shows which features of HTML 5 are supported in which browsers fairly clearly. It would probably be good to research further about each tag you plan on using. Learn how the major browsers have implemented the tags, and if there's any quirks or bare-bones implementations that might be an obstacle to the average user.
I've heard Modernizr listed as a means of leveraging HTML 5 elements while maintaining backwards support for old browsers. Do note that I can't testify personally to how well it performs, having never used it before.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
What all web servers support HTML 5 content? Do they have some config that allows to switch between HTML versions based on client browsers?
HTML 5 was explicitly designed to degrade gracefully in older browsers that do not understand it. As such, there's no need to serve different versions. You may or may not have to put in some client-side Javascript-based shims for some of the more advanced HTML 5 features, but there's no need to have several versions of the same HTML document.
You can determine the users browser agent in PHP or some other web-cgi, look it up in some giant array to determine if it's HTML5 compatible, and serve them a HTML5 page if so, HTML4 if not.
In pure HTML, browsers ignore elements they don't understand, but will treat it like it's not there, so you can use that for SOME tricks, but it's mostly done by serving a different page for HTML4/HTML5 browsers.
Web servers would know client's browser by Useragent.
And with browers' names and versions, the server can identify whether a client's browser
supports HTML5 or not.
With that information, you can dynamically change DOCTYPE in your page
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Or just crawlers ignore HTML5 new-tags (like <article>, <section>, <video>, <nav>, and so on...) indexing the pages?
For example, speaking about google-crawler, I found only old articles like this (2 years ago).
Maybe the rules have been changed?!?
To be honest, I don't think much have changed since that article was written. If you're just thinking about using HTML5 for SEO, then don't. However, if you want to use HTML5 for other reasons, then go ahead. A lot of HTML5 features are still not supported by all browsers so watch out for that if you care about cross-browser support when you build websites.
Personally, I'm using the HTML5 doctype when coding, but I still don't use any of the new HTML5 elements. I do use some CSS3, but I make sure everything's OK in all major browsers before proceeding.
Again, HTML5 won't give you any advantage in search engine listings as far as I know, but as long as you keep your markup semantic, your content fresh and about topic you'll climb the listings.