Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [html]

HTML (HyperText Markup Language) is the predominant markup language used for creating web pages.

2
votes
1answer
80 views

How to white label my website in php

I have a website that follows the following structure: www.example.com/city1 www.example.com/city2 ... Programmatically we change the logo which is hard-coded in a specific config file for city 1, ...
1
vote
1answer
131 views

How can I turn my CRUD database application into a REST application?

I may have gotten myself confused, when reading CRUD vs REST and how they are similar, so I wanted to explicitly ask: can I turn my CRUD application into a REST application, when I have a specific ...
0
votes
1answer
124 views

Is there a rule of thumb when it comes to the “name” attribute?

Since there is things like BEM in naming conventions for HTML class attributes, does the name attribute have anything of that sort?
0
votes
1answer
82 views

Is my approach to dynamically populating web content ok?

I'm porting my JavaFX application to a web based version, which I'm new to. In my web app the user can search the server database for records. At present I've chosen to present the records in a ...
0
votes
3answers
76 views

Prefixing a number with + on html inputs

When asking for positive number inputs on html, is it valid to allow + on the textbox? Like +42? Surely the + sign gets removed during server-side processing. But will allowing + be fine on the html ...
1
vote
3answers
101 views

If either html+css or an image can achieve my desired decoration, which one should I prefer to use?

For example, to create flow indicator like: Step 1 > Step 2 > Step 3 I can either: 1.Use html+css .concave{ border-left:1em solid transparent; border-top:1em solid orange; border-...
0
votes
0answers
46 views

Architecture question with specific use-case (Web Development)

I'm new to web development and looking for ideas to build the following prototype. My requirement is to display near real-time stock market data via charts that are updated automatically every five ...
2
votes
1answer
81 views

Are there standards for handling card swipers in applications?

I'm in the middle of creating a web application for a client, and he wants me to integrate magnetic card swipers so his office staff can quickly swipe a card, and load up details for specific patients ...
1
vote
1answer
75 views

Showing confidential to a customer info without having him to create an account: GET or POST approach?

There's a website where a person should pay to get some service/product. After a person has made a reservation/product by paid for it, I want to allow him to track the progress without having to or ...
2
votes
4answers
511 views

Why is the ampersand (&) a HTML Entity?

I understand the rationale behind why most of the HTML character Entities were created, but I don't understand the purpose behind the ampersand HTML entity. & contains more bits than a & ...
0
votes
0answers
121 views

WYSIWYG text editor design: replace all spaces with spans or master manipulation of nodes?

The goal of this contenteditable div editor is to be able to: double-click on words to add a span around it and further functions highlight range of text (more than 1 word) to do the same as above ...
-3
votes
1answer
86 views

Is there a best practice for naming class selectors for identification alone

Is there a best practice for naming class selectors for identification alone? For example, for defining a single amount field with action button, we end up creating several div containers and div ...
1
vote
1answer
276 views

Angular template variable reference

Here is a weird problem in Angular: <input #pin1 type="password"> <p>You entered: {{pin1.value}}</p> If you type something in <input>, the <p>'s content will not change ...
0
votes
1answer
576 views

Better alternative to having a html form with select input on every row in table

I have a web application (laravel) with a page which presents a large number of rows (financial transactions) in a HTML table. On each row I want to have a drop-down (select input) allowing the user ...
1
vote
2answers
188 views

Do I need to put a license in my website's HTML and/or CSS?

I am making a website for a competition my school is taking part in, however I am not on the team and am not receiving any compensation (save for better references :P). The only condition I have set ...
3
votes
2answers
2k views

PHP : Better way to print html in if-else conditions

Please refer the following two forms of the same code First: <?php if(some_condition){ ?> <li><a target="_blank" href="example.com/channel1/" class="xyz">If content</a>&...
-1
votes
2answers
491 views

Consuming Web API in website with role based views

I understand Web API. I understand websites, how they call a web API and all the good stuff. My question is, how do you control the user view in the website consuming the API, based on the API ...
1
vote
2answers
92 views

Development Of Scriptable Webpage Served As XML And Parsed As HTML

In short, this question is about the cross-browser-compatibility-ness of a way to serve a HTML page as XML. I am interested in serving a web page as XML to be interpreted as HTML for increased CSS ...
1
vote
1answer
389 views

HTML and iframe organization for dashboards [closed]

I need to build a small website for my ops team that will have a series of iframes pointing to a couple of Kibana graphics. The website will have, lets say, 4 links, each pointing to a a specific ...
0
votes
1answer
186 views

Best practices for creating multiple HTML buttons that are used for a similar purpose

I realize this may be subjective, but I don't see any clear-cut place for asking questions on good software design principals. I'm sure there are some software patterns and anti-patterns I should be ...
2
votes
3answers
139 views

Add extra HTML classes for frontend-tests?

Imagine a structure like this, a list with products. <div class="container"> <div class="teaser"> <img src="..."> <p>Product 1</p> </div> ...
4
votes
1answer
107 views

Are tables inside tables a good idea in the right circumstance

I found myself wanting to put a table in a table. I had a momentary war flashback of legacy webpages and email html templates and was about to shelve the idea, but then I considered that it kind of ...
1
vote
0answers
272 views

Canvas-like drawing interface for SVG?

There's lots of stuff out there comparing the HTML elements SVG and Canvas, but I'm still a little confused. I'm looking for a way to draw an arbitrary shape (like, I have a description of a shape, ...
1
vote
2answers
151 views

Tabular Website Design with Continuously Added Content

I'm currently working on a site for a friend, converting a google sheet to a webpage (to reduce the time it takes to modify the spreadsheets and apply them to all users). One particular page is ...
3
votes
5answers
2k views

Hardcoding HTML vs generating HTML from JSON using Javascript [closed]

Backstory I'm a newer developer and have just started on this project and I've been trying to avoid copy-pasting code wherever I can and make the page be built as dynamically as possible, so that ...
2
votes
2answers
9k views

Html file input field add files? (instead of replace)

I'm trying to create a Html file input field which can add multiple files to the form, instead of replacing existing chosen files. This is the basic file input element for uploading multiple files: &...
-2
votes
1answer
71 views

Find source of HTML tags added by jQuery [closed]

A page I'm working on has seemingly random anchor tags showing up all over the place, which is causing significant formatting issues. Those tags are showing up in Chrome DevTools but not the page ...
1
vote
1answer
420 views

What are security risks of WYSIWYG HTML/CSS/JS editors running as web service?

I am currently implementing WYSIWYG editor that will be available on the web, what are the main security issues I should tackle? The editor currently works that when user is done typing, the text gets ...
1
vote
4answers
183 views

How important is it to have multiple action per one page load?

In conventional web application there is single action per one button click from user. So clicking on submit form, send email or change status, delete user etc all this does single action per page ...
0
votes
5answers
185 views

Using HTML id or class instead of comments

I have two elements inside a container. I don't need to give the two inner elements any id or class since they require no CSS or JS references. Is giving them an id just for the purposes of ...
3
votes
2answers
457 views

How to validate ajax request comes from correct page and is not tampered with?

I am building a simple Q&A app with PHP, HTML and JS. I have three tables: users,question and answers, each table has it's own primary key and questions and answers both have foreign key ...
6
votes
1answer
107 views

sass - use abstract selectors or mixins/placeholder?

This might have been covered in another thread. I didn't find it though.. Today, with Sass I have 2 options of styling my website. Lets see examples Example 1 <button class="button main center"&...
1
vote
2answers
114 views

JavaScript function that acts on same element every time

Let's say I have a HTML/JS project which involves interaction with a canvas. Resizing, drawing, retrieving the current state, etc. Obviously I should separate these into several functions. However, I'...
1
vote
2answers
164 views

Writing business logic in view

Can writing business logic in the view(.cshtml) of an MVC application have an impact on performance (for example, Load time)? Is it the preferable way or are there any other best practices?
2
votes
2answers
281 views

Are there good reasons for avoiding the use of semantic HTML markup?

Background I have recently taken up a new job as a developer at a company where I have inherited an in-house CMS built approximately 5 years ago. The CMS constructs pages in XML which are then output ...
1
vote
0answers
257 views

How are HTML files with binary headers interpreted? [closed]

I recently got an inexpensive phone with minimal browser support i.e. no javascript and on a small screen. Wanting to make the most of my device, I decided I would load some ebooks onto my device ...
1
vote
1answer
60 views

How to test dynamically created HTML when the tests are in a separate file?

Code context I have a complex page as part of my web app that is dynamically populated with information using knockout.js. The page has dynamically created anchor tags that link to each other. For ...
1
vote
0answers
41 views

Best method to allow user to choose multiple things from my DB?

So I have a "Bars" table in my database and a "Add a Bar" form which allows a bar owner or manager to add his/her business listing to my website database. I also have a "Beers" table in my database ...
0
votes
2answers
697 views

Scalable Angular SPA Architecture

I am developing an Angular SPA and I am currently in the design phase. I have created a sample architecture which I am planing to use in my SPA but I would get some feedback because I want the ...
-3
votes
1answer
46 views

Passing dynamic data to declarative resource load tags in an HTML document?

Is it possible to pass dynamic data to the browser when it automatically GETs link and img and script etc tags after it has parsed the html containing them? Ultimately would want to pass an ...
3
votes
2answers
168 views

Sharing Website Content : AddThis vs Separate Integration of Social Networks

We have a requirement to add share buttons ( Facebook, Twitter, G+, LinkedIn, WeChat) on all the pages of our website (excluding some of the landing pages) We did a POC for the same with the AddThis ...
1
vote
1answer
132 views

Is it a good practice to use jQuery object to load scripts onto page?

I am writing a website, and I've come up with quite a few scripts taking up a lot of space and ruining the aesthetics of my code. I came up with the idea of creating one script that fills a div below ...
38
votes
5answers
9k views

Should you always program server side for a website?

I'm about to start creating a music project website for a friend. It should be pretty simple for now: no dynamic content (tour dates, etc.), and nothing more than a few embedded sample songs or ...
2
votes
1answer
142 views

Using relative units instead of px following DRY principles

I am relatively new in web development, but I am trying always to find the best way and make my code even CSS and HTML clean. So I've started exploring best practices. First of all lets start ...
1
vote
1answer
604 views

google maps API key for clients

Google API key is now required for new websites even for a single map embed. How are you going to handle this? I guess the correct way should be to ask a client to create his google API key and send ...
0
votes
1answer
128 views

Is it possible to download a section of a HTML file programmatically?

Can one define a section of an HTML webpage to download (typically using HTTP), instead of the whole file, and utilize this in a program to save bandwidth? For example, in C# (but I guess the language ...
0
votes
1answer
136 views

Manipulating DOM via script or rebuild website - which is better?

Let's assume you want to change what user sees on the website. There are two ways to do that: a) manipulate the DOM via JavaScript, but user has to download whole script, with possibility he may not ...
1
vote
4answers
1k views

Do i have to make all my website PHP with embedded HTML to make a good secure website?

I see all websites (THE big ones) make both PHP and HTML in same page .. Do I need to make all my website pages as PHP and embedded HTML inside it ? Can't I make the website all as HTML Pages and PHP ...
0
votes
0answers
200 views

Converting dynamic webpage into static

I am working on a project in which I need to take a dynamic website like adobe spark - https://spark.adobe.com/gallery/gallery-editors-choice/example/maggie-to-monte/ and create a static html+css page ...
-1
votes
1answer
166 views

Php-mysql injection

<?php error_reporting(E_ALL); //ini_set('display_errors', 1); $db_server = "localhost"; $db_name = "2"; $db_user = "root"; $db_passwd = ""; $connection = mysql_connect($db_server,$db_user,$...