January 18, 20188 yr Do you include the following meta tag in to your headers, is it still needed? <meta http-equiv="X-UA-Compatible" content="IE=edge"> I found that the W3C validators would fail, once the meta tag was remove the W3C validators worked. I have noticed this meta tag being use on a lot of websites, while others do not include it. What is your take on using/not using the X-UA-Compatible meta tag?
January 18, 20188 yr Hi Graham, It comes down to what version of IE your site supports. It tells IE which browser mode/emulation setting to render the page at. Blummin' IE...always making things more complicated than they needs to. Ian
January 19, 20188 yr For a modern web project this is pretty much the minimum that you require in a HTML file <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <body> </body> </html> You need to declare the charset. You require a viewport tag to ensure it scales appropriately to devices. I wouldn't limit users ability to zoom etc here. You require the next tag to force IE to use the edge document mode which means it will use the highest mode possible for that particular IE browser. Again I wouldn't worry about W3C validator complaining about this, it's probably not been updated for years and this tag is very browser specific to avoid quirks. Edited January 19, 20188 yr by rbrtsmith
January 22, 20188 yr Author Thanks both, I have now put the meta tag back in. I have a W3C validator plugin within Atom, it shows no errors, what validators do you use?
January 22, 20188 yr 2 minutes ago, GrahamUK33 said: Thanks both, I have now put the meta tag back in. I have a W3C validator plugin within Atom, it shows no errors, what validators do you use? None. HTML is very forgiving, and modern editors like VS Code will tell you if you've forgotten to close an element or something's incorrect, however, if you have so much markup and it becomes unclear, you need to look at splitting your code out into smaller separate files. Like Robert mentioned, most validators seem to be out of date, but they also won't account for things like browser hacks, modern elements and new API's, which could be required to make the site work correctly. In that sense they work against you. It's quite common, though, to have linters for CSS and JS. Modern linters are updated frequently with modern coding standards, and will not only catch errors, but help to keep a consistent code style throughout what you're building. https://stylelint.iohttps://eslint.org
January 22, 20188 yr Author I installed Linter 2.2.0 for Atom and found that it keep throwing up errors, not sure if it was conflicting with something else. I'm not sure if Atom comes with some kind of Linter, as it does offer help with some CSS.
January 22, 20188 yr It's not just a matter of installing plugins for your text editor. Most linters e.g. EsLint and StyleLint will require configs in your project that your text editor plugins can use. They are also run as part of NPM scripts, if you are unfamiliar with NPM I'd suggest taking an evening to read up on it. It's pretty much a must for modern web development. Essentially you have a package.json that is a configuration file for your project holding dependencies and bash scripts that can run packages (Like linting, automated tests, build tools like webpack, and so forth) Essentially you want to check out https://eslint.org/ https://stylelint.io/ https://www.npmjs.com/ You will want to have NodeJS installed too and NVM (Node Version Manager): https://github.com/creationix/nvm is the best way to do that. Edited January 22, 20188 yr by rbrtsmith
January 23, 20188 yr Author That explains why the plugin did not work, I was expecting plug and play. Do struggle with using the command line approach, I have never been able to get my head around it. I do enjoy coding in HTML and CSS, but struggle with JavaScript. I had a look through the links above, and found NPM scripts and using Github is way to advanced for the level I am at. I have been used to using Dreamweaver v8 and recently updated to Atom.
January 23, 20188 yr 1 hour ago, GrahamUK33 said: That explains why the plugin did not work, I was expecting plug and play. Do struggle with using the command line approach, I have never been able to get my head around it. I do enjoy coding in HTML and CSS, but struggle with JavaScript. I had a look through the links above, and found NPM scripts and using Github is way to advanced for the level I am at. I have been used to using Dreamweaver v8 and recently updated to Atom. Yeah it can take some time to pick up. As we web dev though you can get by with just basic terminal knowledge. Using Git was my first introduction to it. Was a matter of writing down 10 or so common commands and I was able to get most things done with that. Not sure if you work in the industry or plan to, but pretty much all web dev work (professionally) will require some terminal and git knowledge. There are good courses for both on Treehouse and Codeschool, both of which are aimed at beginners. Same goes for JavaScript - we all suck at it in the beginning. One of the best JS devs I know came originally from a design background
January 23, 20188 yr Author I don’t work in the industry or plan too either, I have just created a few websites as a hobby. When I find a website I like, or a feature I like, I find myself looking at the code to try and see if I can workout how it was done. Thanks for the help you have given, I have picked up a few more skills since being a member of this friendly group.
Create an account or sign in to comment