Hot answers tagged

41 votes
Accepted

First Time HTML5/CSS Site

Semantically, I would suggest using HTML5 elements more. For example, instead of... <div id="header"> <div id="logo"></div> </div> ...
user avatar
  • 536
30 votes
Accepted

Who's in the fellowship? When are Frodo, and the rest of the gang, together

Loading This is unconventional: var fizzLoaded; function fizzLoad() { if (fizzLoaded) { return; } fizzLoaded = true; … } There isn't any harm in ...
user avatar
23 votes

First Time HTML5/CSS Site

One example of where you should use other HTML Elements ...
user avatar
  • 28.5k
18 votes

First Time HTML5/CSS Site

One quick remark: Never leave out the DOCTYPE (<!doctype html> for HTML 5), unless you want to work around the bugs that the browsers will emulate. EDIT: I ...
user avatar
  • 10.3k
15 votes

Who's in the fellowship? When are Frodo, and the rest of the gang, together

Names I find that in your naming, while it appears consistent, the constant use of the fizz prefix is a bit odd, since when you run it you use other words than ...
user avatar
  • 20.3k
15 votes
Accepted

Fibonacci checker

About this code: function TestFibo() { InputNum = document.getElementById("InputNum").value; The convention for function names is ...
user avatar
  • 107k
14 votes

Cardshifter game lobby

Well, there's lots of code needing review. I've done my best to split it into each language. I've avoided reviewing Angular, since it's a library I'm not comfortable with. HTML: You have tons and ...
user avatar
14 votes

Cardshifter game lobby

Tables for layout This is a clear and obvious misuse of the table element. Tables are for representing tabular data and that's it. Would that same content make sense in a spreadsheet? If the ...
user avatar
  • 3,624
13 votes

Snake game with canvas element code

Some thoughts on your general code style (some points might depend on personal preference): I suggest splitting HTML/CSS/JS into different files Your use of indention and whitespaces is inconsistent ...
user avatar
  • 561
13 votes

Who's in the fellowship? When are Frodo, and the rest of the gang, together

The idiomatic modern JavaScript way to write a loop over elements of an array is forEach. The for...in idiom is designed for ...
user avatar
  • 107k
13 votes

Cardshifter game lobby

There's not much to cover, other than the things @IsmaelMiguel went over, nonetheless: The Mundane: This is less of a important thing, as a style thing, but: ...
user avatar
  • 11.8k
13 votes
Accepted

Cardshifter game lobby

Background: I work as a web developer at a company. I'm the only Angular guy here, and we are using Angular in our greenfield CRM project, so my answer will mainly address Angular (as no one else has ...
user avatar
  • 3,753
12 votes
Accepted

CSS and HTML5 for this fixed header on scroll

HTML You might want to id that nav. It's because it might not be the only nav on the page, ...
user avatar
  • 24.8k
11 votes

First Time HTML5/CSS Site

The CSS rulesets for your #site1desc and #site2desc etc. are all the same (copy-and-pasted). Instead there could be just one ...
user avatar
  • 12.8k
11 votes
Accepted

Why is my page semantically incorrect HTML and incorrect use of CSS?

Several things that would cause me to reject this: Nearly every element on the page is a <div>. <div> is ...
user avatar
  • 3,112
11 votes

"Star Catcher" game

Your code is good, but you have one massive oversight: It's hackable. Your code shouldn't be accessable from the Console. I would recommend using getters and setters to limit incorrect addition: <...
user avatar
  • 11.8k
11 votes

Semantic markup for card blocks

200_success' comment is right, that the context and the content of the component is important for semantics. I assume, from the linked page, that you want to display a list of short articles that lead ...
user avatar
10 votes
Accepted

Non-generalized Site Generator

Let's start on a few of the things you explicitly asked questions on before moving over to the code itself. Are my comments good? I'm coming from Java, and tried to use a Javadoc-like notation, but ...
user avatar
  • 3,753
9 votes
Accepted

Snake game with canvas element code

From a once over: Good I like how you use an IIFE I really like how you use direction = keys[event.keyCode]; Not so good You are not consistently applying the ...
user avatar
  • 32.4k
9 votes

Who's in the fellowship? When are Frodo, and the rest of the gang, together

...
user avatar
  • 28.5k
9 votes

Who's in the fellowship? When are Frodo, and the rest of the gang, together

Inline-block, float and clear?! Most display properties are ignored when you float an element (inline-block, table-cell, etc.). Either float it or change it to inline-block, not both. However, what ...
user avatar
  • 3,624
9 votes

Cardshifter game lobby

You should use strict mode in your JS scripts. It will allow you to avoid a lot of common mistakes. See the section "Changes in strict mode" in the MDN article I linked. Some of the advantages of ...
9 votes
Accepted

Karma Sutra game

Adding feedback in the form of hints like Select the first position, then Now select the second position would enhance UX. Now ...
user avatar
  • 1,952
8 votes

First Time HTML5/CSS Site

You should add the DOCTYPE at the top (before the html element): <!DOCTYPE html> The ...
user avatar
  • 2,575
7 votes
Accepted

Data attribute text() swap on hover

First off, you should clean up the indention. Currently the wrong indention makes the code hard to read. The next problem is that your variables width, ...
user avatar
  • 10.3k
7 votes

HTML5 / JavaScript Tic-Tac-Toe

First, a (proper) HTML document looks like this: ...
user avatar
  • 659
7 votes
Accepted

Simple CSS Parser

I'll mostly judge the actual parsing part, and not that much the boilerplate stuff around it Why explode the file twice? $element should be called ...
user avatar
  • 620

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