I do not have much experience yet and wanted to know tips on what to do to increase the chances that a site is compatible with most browsers.
I do not have much experience yet and wanted to know tips on what to do to increase the chances that a site is compatible with most browsers.
Gilmar, the issue of maintaining compatibility with all browsers is very broad.
About how browsers work:
When you type an address in the navigation bar, click on a button that sends a form, links ... you send a request (usually using the protocol link ) to a server, understanding your request returns the corresponding files.
You can receive various types of files (html, css, xml, javascript, txt ..) and the browser will interpret and generate a visual representation of this interpretation.
But does it interpret / display the way you want?
No! Or at least you should not.
There are standards to follow and W3C is the leading regulatory organization.
The browser should generate the content that agent sees the way the pattern specifies!
And in practice? Does it really work?
Na maioria dos casos SIM !
The problem is that sometimes, bits of code can be interpreted differently and zoned out. In these cases you will have to change or write a specific code for different browsers.
Moreover, this pattern over time is changed as new technologies and needs arise.
The first browsers were able to interpret only a simpler and much coarser version of HTML! We are entering the era of WEB 3.0 and every time a new technology comes up that is supported only by the latest browsers.
So how do you do it?
There are a number of good practices to follow, usually in the courses and tutorials they will be passed!
It's very common to use plugins, APIS, frameworks .. from third parties and in these cases it's cool to use those that we know are well supported by leading browsers, good examples are JQuery and the wonderful bootstrap .
And my last tip is that as you develop, test the site in browsers that you want compatibility and something coming out different between them, search to find the solution.
A good tool for this is Can I Use . The Mozilla Developer Network also cites browser compatibility on the documentation pages.
Using a ready library also frees you from the work of dealing with the particularities of each browser in several important functionalities. JQuery , for example, is widely used to make it easier to use AJAX and DOM manipulation.
What would be the W3C standard? (W3C) is the main organization of standardization of the World Wide Web, that is to say it is the standard of the web content, Browsers are made following this standard.
On the W3C website itself you can find html / css tutorials / tips. And if I'm not mistaken they also provide a little tool on the site that you put the URL of your website and check if it has any errors compared to the W3C standardization.
I hope you have given the right understanding, If that was what you needed to just mark the answer as: Best Answer. And if you need some more information Leave in the comments that I will be editing the question and trying to answer your doubts in a clear way. Site W3C: www.w3c.br /