Skip to main content

10 best practices for Front-End web developers

10 best practices for Front-End web developers
Front-end web development means the practice of producing HTML, CSS and JavaScript for a website so that a user can see and interact with them directly. The challenge associated with front end development is that the tools and techniques used to create the front end of a website change constantly and so the developer needs to constantly be aware of how the field is developing. Front-end web development can seem to be easy at first, but producing a clean, semantic, and cross-browser code is definitely a hard job. Here some hacks for Front-End web developers given below, read on:

10 best practices for Front-End web developers

1. Use CSS reset 
CSS Reset is a short, often minified set of CSS rules that resets the styling of all HTML elements to a consistent baseline. In case you didn't know, every browser has its own default 'user agent' stylesheet, that it uses to make unstyled websites appear more legible. Because by default, browsers don’t apply the same default styling to HTML elements, a CSS reset will ensure that all element have no particular style so you can define your own without the risk of many cross-browser rendering issue.

2. Don’t use @import 
CSS files can be included using the @import directive. This can be useful when, for example, you want to include a style sheet into another. While it works, the @import directive is much slower than the other way to include style sheets into a HTML document: It will not make a difference on low traffic websites, but if you have the chance to own a popular website, don’t waste your visitor’s time using @import.

3. Place JavaScript file at the bottom 
Popular practice of early web development was to place JavaScript files within the <head> and </head> tags. The problem is that your JavaScript files will be loaded first, and consequently your content will be loaded after. By placing JavaScript files at the bottom of your documents, you’ll ensure that JS files will be loaded only when the content has been properly displayed.

4. Use HTML semantically
HTML is a markup language, used to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, and more. If you started to create websites in the good old 90’s or in the beginning of the century, you know how dirty the markup was at the time. But happily, it has evolved. Among other things, it is important to use HTML element semantically.

5. Explain which DIV you’re closing  
Most of the time when we see website source, at the very bottom of the page, an almost endless list of closing </div> tags. Div's can be cleaners than tables, but without proper code organization, it can be as messy as table based code. Using indentation is a good start. But a tip that can definitely make you save lot of time is to comment every div tag you’re closing, like using <!-- end -->

6. Don’t write inline CSS
As a markup language, the right use of HTML is to organize documents by defining a header, a footer, lists, blockquotes. Some time ago, front-end web developers often used now deprecated HTML attributes to style a particular element. Nowadays, the style attribute allows developers to insert CSS directly into a HTML document. This is very useful for testing or when you’re in a hurry. But the <style> attribute is bad practice, even Google forbids it.

7. Don’t mix JavaScript with HTML  
Just like mixing HTML code with CSS is bad practice, you shouldn’t use any JavaScript in your HTML documents too. This may seems a bit harder at first, especially for beginners; but it is definitely not, and it will keep your HTML document clean.

8. Use conditional comments
IE sucks, and some clients suck even more by requiring you to create web pages which are compatible with this obsolete browser. To target specific versions of IE, you can use the well known IE hacks, as shown below:
height: 200px; /* normal browsers */
_height: 300px; /* IE6 */
.height: 250px; /* IE7 */
*height: 350px; /* All IEs */
Those hacks are extremely useful sometimes, but they are not the best way to target a specific version of IE, and it will cause your CSS validation to fail.

9. Optimizing images
Image optimization is an art that not many people master. There are many good image editing tools that allow us to get the best visual result for a certain file size but "under the hood" a lot more optimization can be done.

10. Test your site to avoid cross-browser issues
The term cross-browser is often confused with multi-browser. Multi-browser means something works with several web browsers. For your visitor's sake test and enhance your site make it as compatible as possible.

Comments

Popular posts from this blog

Easily Get 50000 free Backlink for your website

Backlinks are heart of SEO. Without backlink your website will not get a good position in search result and won't get indexed quickly. As you already knew there is two ways you can get backlinks one is Natural linking and another is paid or automated linking. Natural linking is worth to doing and it takes a while but if you don’t have enough time, running a professional business website and need to reach a destination quickly, automated backlinking going to be your last choice. To make automated backlinks you will need to buy paid link package or if you just don’t willing to buy links right now let’s start with free. Here such kind of free backlink maker, free backlink generator listed. And definitively you have a chance to create 50000+ free backlink for your website. But you should also remember Google doesn't like it, I mean Google doesn't recommend it at all. Read on-

+ 50000 free backlink for your websiteIndex kings
Rapid website submitter index kings it will submit y…

Add Cool Social Media Sharing icons below posts in Blogger

Change the taste of random looking social sharing button below posts in Blogger, here you can find a different and cool social media sharing widget what I named it Coldblodded! This social sharing widget loads faster than other icon base social shares, it's icons change color with mouse hover with flipping effect, it got the major social media sites share, main color is black colored what looks artistic and attractive.
Coldblodded social media sharing widget offers shares a post to Facebook, Twitter, Google plus, Pinterest and bookmark a post on Delicious, Evernote, Stumble upon, Digg, Blogger, Yahoo bookmarks additional feedburner email subscription. It made with CSS, HTML and icons uses only a piece of image what will draw all icon process calls CSS image transition CSS Sprite, This widget also reduce HTTP request unlike other icon base sharing choices. Will be fit to any kind of Blogger blog, no matter they are professional blogs, gallery or other features sites. Let's see…

Top 6 Best Alternatives to ZBIGZ

ZbigZ is an ideal for downloading torrent files with top speed and least difficulties. Due to ZbigZ's high speed torrent grabbing for premium members, ZbigZ merely unable to provide much support for a free user. ZbigZ servers often get down or caching issues might spring. That's why we made a list of best ZbigZ alternatives
they are absolutely free with having quite high speed. Read On:



Top 6 Best Alternatives to ZBIGZ 1. File Stream 
File Stream is the ideal substitute for ZbigZ in terms of its quality server and download speed. You need to upload your torrent files to File Stream; to grab you torrent files in minimum time. It also allows you copy Magnet links and paste it on File Stream that will encrypt connections so there isn’t any need to bother about your privacy. File Stream offers a free account besides premium package. File Stream doesn’t slacken your speed to ensure the highest download sped from ISP. File Stream gives exclusive download to your big tor…

12 best free Article Rewriter/Spinner you can use

Copy paste's day is over, search engine's unique content search system finds plagiarism automatically and charge copy paster's for not to having unique content on site and also deploy duplicate content issue what is a big SEO factor now days. Plus if you use stolen text to use those on your site you also will get Dmca,Copyscape, Creative Commons and other content protecting law and policy warning and charge.
Also for holding site's readers eyes and mind on your site content spinning article can be use for present a article more charming with rich vocabulary and thesaurus. And batch producing a lot of article in short time from already someone's published article, article rewriter can be a helpful easy way for you or your client.
There is lot of free article rewriter/spinner online web tool and offline desktop application you can find for spinning your articles for free. After testing most of these tools, I made a final list. Now from the best article rewriter lis…

10 Best Free Flash Editor software to use

Flash .Swf/.Fla file editor what also call Flash builder/Flash code editor. Flash builders are those software what allows you to edit an existing Swf file or create a awesome Flash animation file form scratch. There are a lot of Flash editing software you can find around the web some are open source and free for everyone's use again some are paid. If you want to know about Flash editing software what are free and open source and using them you will be able to create professional Swf animation or re-edit some one's flash animation (Swf, Fla files) than keep on reading-

10 Best Free (Open Source) Flash editor software to use
1. Flash Develop
Flash Develop is a free and open source code editor, Flash Develop offers first class support for ActionScript (2 & 3) and Haxe development, Great completion and code generation, projects compilation and debugging, plenty of project templates, SWF/SWC exploration etc, The layout includes a useful snippets panel that has keyboard commands …