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>
...
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 ...
23
votes
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 ...
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 ...
15
votes
Accepted
Fibonacci checker
About this code:
function TestFibo()
{
InputNum = document.getElementById("InputNum").value;
The convention for function names is ...
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 ...
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 ...
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
...
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 ...
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:
...
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 ...
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, ...
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 ...
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 ...
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:
<...
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 ...
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 ...
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 ...
9
votes
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 ...
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 ...
Community wiki
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 ...
8
votes
First Time HTML5/CSS Site
You should add the DOCTYPE at the top (before the html element):
<!DOCTYPE html>
The ...
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, ...
7
votes
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
html5 × 417javascript × 261
html × 129
css × 125
jquery × 80
canvas × 43
beginner × 31
php × 27
performance × 23
game × 23
form × 17
twitter-bootstrap × 16
dom × 12
ecmascript-6 × 10
angular.js × 8
animation × 8
ajax × 8
audio × 7
microdata × 7
object-oriented × 6
datetime × 6
sass × 6
video × 6
image × 5
typescript × 5