Tag Info

Hot answers tagged

92

Because saving HTTP requests is of little use when you achieve it by breaking caching. If the stylesheets and scripts are served separately, they can be cached very well and amortized over many, many requests to wildly different pages. If they're mushed in the same HTML page, they have to be re-transmitted with every. Single. Request. This page's HTML, for ...


73

HTML and CSS are difficult to interview for a few reasons: They are too basic, compared, for example, to a programming language, They depend very much on the context of the job. Examples: If you create Google scale, hugely fast and optimized websites, the people you interview for the job cannot ignore what CSS sprites are. If you create XHTML W3C valid ...


68

You should build a house first, then paint it. An HTML document can stand on its own, even though it may look dull. A CSS style sheet cannot; it is nothing displayable (except as code) but instructions for display. It’s a different issue that during painting, you may wish to do changes to the house. With real houses that’s usually not feasible, but in ...


51

HTML5 is not a single integrated thing. It's a collection of extensions to HTML, some of which are widely-implemented and can be used safely, some of which no-one implements yet, and a whole lot in-between. If you try to treat HTML5 as a coherent single development platform and ‘learn it all’ you will have a really difficult time. Instead what you need to ...


43

You should do both: Start with hosting from a CDN such as Google's because it will likely have a higher up-time than your own site and will be configured for the fastest response time. Additionally, anyone who has visited a page that links to the CDN will use their cached copy of the file, so they won't even have to re-download a copy, making the initial ...


42

If I were to start a new HTML5 project from scratch right now I would probably do something like this: Download and use the HTML5 Boilerplate. This will give you a fresh page with most of the important things initialized and ready for testing. Also includes some nice debugging features you should be using along with firebug Look over Dive in to HTML5 to ...


33

I had the same question, then I read this article and I was sold on the idea of letting Google host my jQuery library. The article states the main benefits of letting your libraries be hosted by Google's Content Delivery Network (CDN): Decreased Latency - Users not physically near your server will be able to download jQuery faster from Google than if you ...


31

There is no way to avoid that. They are coupled because they interact with each other. If your javascript intends on doing any kind of DOM manipulation, then it needs a way to reference the DOM. There are various conventions for it. The Level 2 DOM API provides the getElementById, getElementByTagName, and getElementsByName methods. To this day these are ...


28

Former Designer here, turned Dev, and I used to piss and moan about Web Controls too. Honestly, its MUCH cheaper for a designer to adjust their practices than for a .NET Developer to delve into a custom impelmentation of a GridView because the designer INSISTED that each TD have a 'rel' tag (or whatever). As MainMa very wisely pointed out, the decision to ...


24

Nope, sorry. Even if you could, users could just submit the form to your site using some other tool. The golden rule here is: Never trust user input. Be sure to validate everything on the server side (in php) and look up any important values from your database instead of trusting whatever came from the user.


21

Adobe already did it with Adobe Air, and Mozilla too with Prism . Google also tried to bridge the gap between desktop and web with Google Gears. But in general, web technologies are not suited for many types of desktop applications, here some reasons why: No immediately available full hardware access. No low level system access. No easily available ...


19

Here are some questions I would ask about CSS: CSS box model. Margins, padding, etc. IE model vs. W3C model. How can one switch between the two? What are their benefits and drawbacks? CSS positioning. What does it mean for an element to be "in the flow" and "out of the flow" inline-block and other display values. Difference between display: none; and ...


19

Chris Coyier has an awesome rundown of SASS vs LESS over at css-tricks.com. It's definitely worth the read. As for some of your specific questions: Community I work entirely with SASS/Compass, so I'm not intimately familiar with LESS's community, but nor have I really needed SASS's community. Their documentation is fantastic and has solved any problems ...


17

Web designers should not usually have to touch the PHP code much, if at all. Usually designers develop the visuals in some graphics package (where needed), usually Photoshop. Build the HTML/CSS for a static version of the content, with alternate content for dynamics also built. Then the programmer tends to take this and make it dynamic. Failing that, ...


16

LESS CSS dynamic stylesheet language designed by Alexis Sellier. It is influenced by Sass and has influenced the newer "SCSS" syntax of Sass, which adapted its CSS-like block formatting syntax. LESS is open-source. Its first version was written in Ruby, however in the later versions, use of Ruby has been deprecated and replaced by JavaScript. The ...


16

Personally, I take a cue from http://html5boilerplate.com/ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> <script>!window.jQuery && document.write(unescape('%3Cscript src="includes/js/libs/jquery-1.6.1.min.js"%3E%3C/script%3E'))</script> This pulls the main jQuery file from Google, but if it ...


16

Bounty or not, to some extent the choice will always be a "matter of preference" - after all, how would you feel if the W3C recommended (or even imposed) a certain convention that you didn't feel was right? Having said that, though, I personally prefer the lowerCamelCase convention, and I'll give the reasons and practical considerations I've used to make up ...


16

Simply because Web performance really matters ! 99% times it will give you faster end-user response times. Here are a few exampels from Velocity Conf. Bing – A page that was 2 seconds slower resulted in a 4.3% drop in revenue/user. Google – A 400 millisecond delay caused a 0.59% drop in searches/user. Yahoo! – A 400 milliseconds slowdown resulted in a ...


15

Using Flash will lose them eyeballs. One of the big reasons Google trounced Yahoo, Ask Jeeves, et. al. in the search engine wars is their landing page and results appear so incredibly fast. Even in the late 90s, when Google's search results weren't really better, they were still the go-to search engine if you didn't want to waste your time. On the other ...


14

looks amazing, works great, and lets me get to designing and not worrying about the little stuff. I think you answered your own question there. There's a variety of mature CSS frameworks and Javascript UI libraries out there, but Bootstrap has two very nice advantages: It's supported by Twitter, which means that it will probably be around for a very ...


14

In my company, there are a few people specialized in this job. They are designers. And they know HTML. They can be a bridge between the designers and the front-end engineers; which they usually are. This way, we just have to integrate their HTML. This is a hard job. There's a reason sites like "PSD to HTML in 24h" work well. The solution in our company is ...


13

Another thing to consider is that standards organizations have limited bandwith--they can only work on so much at a time. Given these constraints, I would rather they work on solving problems the web developers cannot solve themselves (like adding new tags or CSS animations). SASS and haml are trivial to compile down to CSS/HTML, so the advantage of native ...


13

Quirksmode.org is probably the single best reference for browser compatibility issues. Once you track down which elements or CSS are related to your issues, the site will help you understand exactly what's happening differently in each browser and ways to resolve your problems.


13

CSS isn't trying to make things more difficult on purpose, it was designed with a far simpler goal in mind, variables and hierarchies are hardly its only shortcomings. LESS and Sass exist specifically to address these shortcomings, and until either capability is natively supported, you should stick with them. That said, W3C's CSS Working Group is working on ...


12

If technical reasons don't work, tell them that you can't use flash in the iPad or the iPhone


12

I am not aware of one. But I am aware of what appears to be a reasonably thorough list of inaccuracies that can be found at w3schools. Also, the Mozilla Document Center is a community-editable wiki and is already off to a good start as a knowledge base. Check out the MDC's Content, all user editable: HTML Element Reference CSS Reference JavaScript ...


12

It depends. Is the designer an HTML/CSS front-end developer or strictly a graphic designer? Big difference. I've known brilliant graphic web layout designers that couldn't code an html page for the life of them. It wasn't their job/focus. I've had it go the other way too. It just depends on the skill set of your team.



Only top voted, non community-wiki answers of a minimum length are eligible