HTML (Hyper Text Markup Language) is the standard content markup language of the web. It is an open standard developed and maintained by W3C (World Wide Web Consortium).

learn more… | top users | synonyms

2
votes
0answers
16 views

Creating <select> element and append data to it

I've made the following and have a few questions: Do I have some (big) mistakes in this approach? (bad practices, 'this code is trash'...) 1.1 If I do, can you suggest what to fix? Are appended ...
2
votes
1answer
13 views

Matrix of checkboxes - only 1 allowed in a row

Task Create a matrix of checkboxes. The user must be able to select only 1 checkbox in a row or unselect all of them. Solution <!DOCTYPE html> <html> <head> <meta ...
2
votes
2answers
19 views

How should I sort an HTML table with Javascript in a more efficient manner?

The following is my own code to sort an HTML table with Javascript (without any external library like JQuery). I’ll be glad if experts in the field show me the shortcomings of my code along with the ...
5
votes
1answer
44 views

How to optimize my CSS/HTML webpage?

I am working on a (HTML/CSS) website to improve my skills but I am not sure if I am doing it the right way, because I have a lot of floats and sizes. I also need help with some CSS things: What I ...
0
votes
0answers
11 views

Web Audio Constructors and jQuery

I'm trying to figure out a way to have cleaner, efficient code for a web audio project i've been working on. the code I have right now is this: //OSCILLATOR INFO// // Oscillator Pitch is in Hz. // ...
6
votes
2answers
62 views

Generating random HTML color grid

This is a Python script that generates a grid of random HTML colors. It works by reading random data from /dev/urandom and then encoding it as a hexadecimal string. This string is spit into ...
2
votes
2answers
41 views

How can I improve this text revelation effect?

I would be glad if someone could take a look at my code and maybe improve it. It's an animation effect to gradually reveal text as if it were being decoded. I wouldn't mind if it could run with jQuery ...
5
votes
2answers
100 views

How can I improve the following code using HTML5 and CSS3?

Using the Flat Web Design Tutorial offered at 1webdesigner I tried converting the resulting PSD file to HTML5 and CSS3. While attempting to use sectioning elements in the markup I quickly found myself ...
-1
votes
1answer
21 views

CSS align header label and span [closed]

I want to create page that will show me server info. I tried as shown bellow to add header then label then span, but when Im trying to align the info every time it's become a mass. HTML CODE <div ...
0
votes
1answer
65 views

Responsive HTML5/CSS Code Review

Please review my code based off an responsive Initializr template. It's functional and visually correct, but I know there's better ways to write the code. Let me know if I can layout the HTML5 better ...
-1
votes
0answers
21 views

Semantic CSS class names [migrated]

I always read articles that suggest to not use presentational CSS class names. Currently I'm working on a small website project. The footer on this website looks like this: Although it's pretty ...
0
votes
2answers
92 views

Car Rental Form

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" ...
2
votes
2answers
71 views

Deeper abstracting of code into functions

I created a quiz using the module pattern. My code is as follows: ; (function ($) { "use strict"; var s, QuizDefaults = { modalOverlay: $(".modal-overlay"), modalWrap: ...
2
votes
2answers
155 views

Is this a good structure for my website?

I have been building a site using php and would like advice to improve the structure of my site and the best way to lay out my code for SEO. I'm also a little concerned about echoing large chunks of ...
6
votes
2answers
79 views

JavaScript Game Engine Design

I recently gutted and redid my game code to be object oriented (before it was just functions and a mass of global variables. Before I go an make more functionality happen, I would like to take one ...
4
votes
3answers
84 views

Real time HTML tester

Here is a simple webpage that I wrote to test HTML code in real time as typed, what are some ways that I can Improve my code? part of the code is reused from a previous project, I believe that it may ...
3
votes
2answers
89 views

Is there anything incorrect about this layout, semantically or otherwise?

I would like to know if my chosen layout is HTML5 standards compliant, or if I'm using the heading tags incorrectly (or any other tag for that matter)? Main Header <h1> for website name ...
-1
votes
1answer
30 views

HTML / CSS - Can't align the body of the resume [closed]

I'm new to HTML and CSS, so I decided to build a dumby resume simply to work on my new found knowledge. However, I am completely stumped on why my entire message body is centered, instead of aligning ...
4
votes
6answers
131 views

which of these 2 blocks is better?

I am looking for some opinions about these two block of code. They do the same thing, they are just written differently. Which one you recon is "better", "faster", more "readable", gives you more ...
1
vote
1answer
70 views

Number of CSS classes for one element

My project uses at least 100 helper classes like the below: .pa5 {padding:5px} .pa10 {padding:10px} /* ... */ .pt5 {padding-top:5px} .pt10 {padding-top:10px} /* ... */ .pr5 {padding-right:5px} .pr10 ...
1
vote
1answer
59 views

Calculate number of words and characters (/statistics) from an HTML Textarea

var textarea = document.getElementById("textarea"), statusBar = document.getElementById("status-bar"); function updateStatusBar() { var text = textarea.value, chars = text.length, ...
2
votes
1answer
44 views

QR Code generator

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>QR code generator</title> <style> body { font-family: arial, sans-serif; } section { ...
1
vote
1answer
65 views

How to simplify my jQuery code?

I am trying to simplify my code, which will do several things: Give the same width to every columns no matter how many columns the table has. add input field if there is no texts inside a td make ...
0
votes
3answers
119 views

Creating chunks of HTML with jQuery

I am working on an online ordering form and am looking for some advice about my jQuery. I am re-developing the code base for this ordering form and improving what was created by a web design group ...
0
votes
1answer
75 views

How to concisely specify that one set of HTML elements controls a corresponding set?

How could the following code be made more concise? HTML STRUCTURE <body> <header> <ul id="main-nav"> <li></li> <li></li> ...
7
votes
3answers
382 views

What do you think about my questionnaire?

This time I'm not here to ask for help with my code, but to ask you to judge my code. Where can I improve? What should I do better? Where did I do things wrong? This is a quiz that I had to do as ...
-2
votes
2answers
81 views

Hover over a div to change its border? [closed]

HTML <div class="principal" id="principal"> <img class="principal" id="principal" src="images\principal.jpg" /> <span id="prinhead" ...
2
votes
1answer
50 views

Can this HTML code be improved?

HTML <!Doctype html> <html> <head> <title>Welcome To DPS Raipur</title> <link rel="icon" type="image/png" href="logo.gif" /> <link ...
1
vote
1answer
78 views

Review of HTML and CSS for a newsfeed of posts

Originally my wireframe was But I ended up going with this in testing. The image is the result of my new code. Keep in mind that the actual content is just filler content and will be dynamic. ...
4
votes
1answer
122 views

custom scrollable div

down vote favorite I'm trying to create a custom div scroller got it working. But still a little rough around the edges. Please take a look, I welcome any ideas or suggestions. DEMO. <%@ Page ...
-1
votes
1answer
69 views

Why is this mystery “-” appearing to the bottom of this image? [closed]

I have an issue in my HTML code, I have look through it to see why this is happening but to no avail. On my website to the bottom right of my logo appears a mystery "-". Here is my code: <?php ...
2
votes
1answer
112 views

How to clean up this code?

So I have this code... if ($error == '1'){ echo '<div class="error_message">';} if(strlen($display)<4) { echo "Display name is too short. <br>"; $error = '1'; } if ($email == '') { ...
3
votes
1answer
46 views

JavaScript/jQuery - How do I improve this js code/ refactor

I want to know how can I improve this piece of js with respect to best practices/performance. JS code: var treeGroupTypes, treeType, leftLeafClass, rightLeafClass; treeGroupTypes = ...
2
votes
0answers
53 views

adding a new class to html tag and writing it back with beautifulsoup

I am working on a HTML document to which I need to add certain classes to some elements. In following code I am adding class 'img-responsive'. Here is my code : def add_img_class1(img_tag): try: ...
5
votes
2answers
128 views

Toggle script trouble

I have been working on a toggle script, but I find myself repeating my code. Is there a way of combining it all? I am new to jQuery, so forgive me for my beginner question. HTML: <div ...
0
votes
2answers
26 views

Anyway to simplify this jQuery

This seems like a mess to me and I am afraid it could break easily because of the many chains. Is there a way to simplify this? // Sorting on the Process page 'Procedures' tab. ...
3
votes
1answer
33 views

Optimizations for this user-account HTML structure?

I need a valid and semantic HTML structure for the user-account (user-panel) section of the overall layout of my web application. What I saw in other web apps include: User title (or email, or ...
1
vote
2answers
235 views

Removing extra spaces in beautiful soup code and other improvements

I have written a script using Beautiful Soup to scrape a html and do some stuff and produce html back. However I am not convinced with my code and I am looking for some improvements. Following is the ...
3
votes
2answers
109 views

Simplification of Python code (HTML extraction)

I'd like to extract HTML content of websites and save it into a file. To achieve this, I have the following (working) code: output = codecs.open("test.html", "a", "utf-8") def first(): for i in ...
2
votes
1answer
22 views

replica site checkup

For a project I need to replicate a website and I was wondering if any of you could take a quick look to see if I made any obvious mistakes. Right now it's just the HTML part, but I would like to make ...
3
votes
1answer
318 views

Basic Javascript Game. All code critique very welcome

This is my first JavaScript/jQuery project after having been reading and learning for a good few weeks. I am proud I have made something that at least works. However, I'm sure that my code is ...
3
votes
1answer
252 views

Improve password generator (random)

can you please take a look at my code and improve it (if necessary)? ;) http://jsfiddle.net/a2r9k/ HTML <button id ="getnewpassword" title="Click to get a new password.">Get New ...
2
votes
2answers
1k views

Chat with PHP, MySql, Ajax: How to improve it?

I made this simple chat in php. You have suggestions on how I can improve it? This file configures the connection to the server This file is a simple form "login" ( only username required ) ...
2
votes
1answer
189 views

Review of my CSS for aligning the navigation icons and text in a footer menu

The navigation in my footer menu looks like this It works, but I get a feeling that using spans the way I did was a bit of a hack. So I would also like to know how to maximize compatibility as ...
1
vote
1answer
72 views

HTML Templates with Substitutable Areas - PHP

In order to separate my views (markup) and code, I elected to write my views like this: <!DOCTYPE HTML> <html> <head> <title>%PAGE_TITLE%</title> ...
3
votes
1answer
76 views

In need of some aid in regards to making my code more efficient

I've created a form that gathers and submits information to SQL database via LINQ, and sends an email if all goes while saving the database and doing a redirect. Recently, it started submitting data ...
4
votes
2answers
65 views

Am I following the correct principles for HTML / CSS coding?

I've just started learning HTML and CSS. Currently I'm creating a test site to practice with. I'm just after an early idea if the principles I'm using are correct.The below is an snipit from the main ...
1
vote
0answers
366 views

Is this simple AJAX login/register script sufficient?

I'm using Twitter Bootstrap. I haven't coded anything significant web design related in a while, because I've been doing desktop stuff and games. I'm trying to get back into the flow of things. Can ...
2
votes
0answers
88 views

Rendering HTML through template. Best practices for dynamic CSS?

I'm creating an unordered-list element in Backbone via underscore templating. I've got the following: <ul id="FrontRack" style=" background-image: url({%= ...
3
votes
1answer
106 views

Follow button like on Twitter

I want to create an like button like on Twitter. I used Twitter bootstrap and this code: $(document).ready(function(){ $('.btn-follow').on('mouseover', function(e){ if ...