When I was starting out as a web developer, I had to face some struggles when finding solutions to some of my problems. I had to learn and try new things but there weren?t as many tutorials as there are today. The best alternative was to learn and study from the work of others, analyzing their process and work methods.
These days, it seems like a new tutorial appears every minute, but personally I believe that looking at actual implemented solutions is still a powerful way to learn, and you also have many tools and methods at your disposal which can help you see and figure out how your favourite websites were built. Everything you need to know and learn is right in front of you and at your disposal.
Web Development Tools and Extensions
The traditional view source code option was not enough for a good code inspection. It became very important for a web developer to have a toolbox that could provide him with a set of possibilities specifically made for code analysis and inspection within a web browser. Those tools are called Developer Tools and are usually installed by default or as an extension/plugin, working directly from the browser itself. With the developer tools you can see all the source code of a webpage as you did before with the traditional View Source Code option, but with way more options and functionality than before. You can inspect, edit, watch live results and much more.
Google Chrome (Developer Tools) / Safari (Developer Tools)
You may be wondering why am I including Chrome Developer Tools and Safari Developer Tools together, well that?s because they belong together. The Developer Tools is part of the Webkit open source project which means Safari and Google Chrome share the same code base, they even share the same layout.
So let?s start with Chrome, my new favourite. Google Chrome?s Developer Tools is very recent compared with others like Firebug (Firefox), but it?s growing fast and getting better and better with each new version.
The same obviously applies to Safari.
?The Google Chrome Developer Tools provide an integrated environment for debugging, optimizing, and understanding a web application, or website, running in Google Chrome. The developer tools are developed partly through the WebKit open source project, where the tools are called Web Inspector.?
?All of Safari?s powerful developer tools are easily accessible from the Develop menu. The Develop menu contains a wealth of tools that you can use for web page manipulation and debugging.?
For a better understanding, you can check the links below.
Google Chrome Developer Tools
Safari Developer Tools
With Firefox the smart solution for a web developer is definitely Firebug, one of the most popular Firefox extensions out there. Although the Webkit Developer Tools is growing at a really fast pace, Firebug is probably the most complete and mature tool you can have for web development and code analysis.
Firebug?s interface and work process is extremely similar to Chrome?s Developer Tools (or vice-versa).
Opera (Opera DragonFly)
This is Opera?s gem for code analysis and inspection. It?s surprisingly powerful and personally I would put it in third place right behind Google Chrome?s Developer Tools. The downside is definitely the aesthetics but its features and cross-device compatibility places Dragonfly among the best.
For more information, check the link below.
Internet Explorer (Developer Tools)
Yes, Internet Explorer has one too. Although the interface looks a bit old and not as good as other solutions since it lacks some functionality, it can be almost as good as the competition.
?The Microsoft Internet Explorer Developer Toolbar provides a variety of tools for quickly creating, understanding, and troubleshooting Web pages.?
You can learn more about it at the link below.
Internet Explorer Developer Toolbar
Check a website font
With real text (not an image of text), the first and easiest way is by using Developer Tools / Firebug, so if you have it just select the text, inspect element and you should immediately see on the right side the font or font-family property which tells you the font that?s being used. Another way to do it is by using an extension/plugin for this purpose. There are probably similar plugins for other browsers like Chrome, but if you?re using Firefox, you have a great add-on called Context Font. With Context Font all you need to do is select the text (again, needs to be real text and not an image), right-click on it and you will immediately get the font and size used.
If the font you?re looking for is being used as an image, you have only one way to do it. One of the many places you can do this is myfonts.com. Upload your font and follow the steps.
Check the box model of an element
The box model represents the visual structure of the elements of a webpage using the corresponding properties like width, height, margin, padding and border, according to the visual formatting model. It?s possible to check the box model of any page and element using Developer Tools or Firebug. In order to do that, you just need to inspect the desired element and select Metrics on the right side of the Developer Tools panel. With Firebug, you need to select Layout (not Metrics).
Copy all text content of an element with Developer Tools
This one is a popular trick which is achieved by using the Developer Tools console. So let?s say you would like to copy this article?s text without the need of having to select all the content with your cursor (particularly useful on very long pages with too much text). To do that, inspect any element on this article page and look for the text container?s name from which you would like to copy the text (which in this case is called articlesContainer), now go to the console option and write the following command: copy ( articlesContainer.innerText ). Now paste the text anywhere you want and you are done! You?ve just copied the text inside our articlesContainer which corresponds to our main article text.
MIN is a bookmarklet that will strip any decoration from a site. All color, borders and backgrounds are removed instantly, helping you identify the successful and unsuccessful uses of typography and layout.
W3C Markup Validators
Quick markup validations of any web document.