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

learn more… | top users | synonyms

2
votes
2answers
219 views

Are there any reasons not to ever use classes or ids anymore?

I sort of understand unobtrusive javascript. Even in my CSS now I hardly ever use classes or id's because I like clean, easy to read, uncluttered html files. For example, why use this: <body ...
2
votes
1answer
52 views

Merging dynamically created data with an HTML template

I have a C# application where I'd like to present information that is accumulated in memory from an embedded system in the form of an HTML page in a near real-time manner. As a proof of concept I've ...
0
votes
6answers
486 views

Should i expect real world questions from interviewing agency? [closed]

I started coding almost a year ago. By "coding" I mean HTML(5), CSS(3), and only few times I implemented some AJAX and JavaScript. I am interviewing for a position that expects me to know HTML, CSS, ...
1
vote
1answer
64 views

Best practice for storing external text to then place in html

Sorry if I'm not explaining the question well in the title, I'm not sure of the correct lingo. Let me give you an example instead. So this is a normal HTML file. <span>Well to the ...
-3
votes
0answers
46 views

Making Div Tabbed Panels in Javascript [on hold]

I have a website that needs to dynamically generate div tabs based on user input. Currently, this is the code I have to generate a single div: var div = document.createElement("div"); ...
2
votes
2answers
142 views

Why does :nth-child() in CSS start from 1 instead of 0?

Why does :nth-child() iterate from one instead of zero? As shown in this example. Why does it select the first element and not the second when p :nth-child(1)
405
votes
5answers
144k views

Pros and Cons of Facebook's React vs. Web Components (Polymer)

What are the main benefits of Facebook's React over the upcoming Web Components spec and vice versa (or perhaps a more apples-to-apples comparison would be to Google's Polymer library)? According to ...
19
votes
6answers
36k views

Which is better: to include HTML inside PHP code or outside it?

Look at this: <?php echo "Hello World"; ?> <br /> <?php echo "Welcome"; ?> And now look at this: <?php echo "Hello World"; echo "<br />"; echo "Welcome"; ?> Which ...
0
votes
1answer
107 views

What type of encoding does wikipedia use?

I have the wikipedia data dump and trying to decode special characters in the page titles, except a lot of characters don't match up the "standard" ascii encoding (referencing from here.) As an ...
-5
votes
2answers
86 views

How do I make such a page that opens different link in web (PC) and different in mobile (phones)?

I am building a website that looks beautiful in Web but worst in mobiles. I want to build the same site but different designing for mobile. Whenever user opens site.com then it auto redirect to ...
2
votes
7answers
2k views

What to use instead of IDs in selectors in CSS

I recently installed a csslint package for my Atom text editor. I keep getting warnings saying "Don't use IDs in selectors." I found this weird since I've always been using IDs in selectors in CSS, ...
6
votes
1answer
150 views

Is there a standardized practice for ordering attributes in HTML tags?

Thanks for looking. I am working on an AngularJS project and the attributes are numerous in many of my HTML elements: <button type="submit" ng-click="Page.UI.DetailView.ExecuteFunction()" ...
1
vote
1answer
98 views

Should I use <table> or <div>? [closed]

I am making a time-sheet portion of a website and I was wondering if using to create the time-sheet portion is an appropriate usage of table or would div be a better use?
0
votes
0answers
27 views

HTML Encoding - XSS protection

My general rule for web development is that the server encodes HTML tags in any user-generated input when it is first submitted to prevent XSS. However recently someone suggested that instead of ...
0
votes
0answers
57 views

How to effectively log while avoiding a bottleneck

I have a fuzzer for x86 Internet Explorer (in HTML) that I've heavily modified to have reproducible, determinisitic crashes (so that I may perform root cause analysis faster). I'm attempting to ...
0
votes
5answers
4k views

Is using xml + xsl to create a weekly html email a good or bad idea?

The guy who is in charge of our html emails is leaving and I have been asked to take over. We are an online retailer and send out an email once a week. An email will consist of a main image, a bit of ...
10
votes
5answers
3k views

css - use universal '*' selector vs. html or body selector?

Applying styles to the body tag will be applied to the whole page, so body { font-family: Verdana } will be applied to the whole page. This could also be done with * {font-family: Verdana} ...
1
vote
3answers
135 views

Nicest way to map RGB colors from HTML to LED

I have attached a RGB LED to a color picker on a webpage and have hit the obvious problem that though the LED is 8-bit like HTML the color rendering is very different so with the more subtle shades ...
8
votes
4answers
4k views

Why is it (or was it) important to separate CSS from HTML? [duplicate]

Intro I recently watched the slides from React: CSS in JS and I really like the idea of having CSS applied using JS (and with JSX, this would mean having all the HTML, JS and CSS in one file, which ...
157
votes
8answers
39k views

Why are there are no PUT and DELETE methods on HTML forms?

HTML4 / XHTML1 allows only GET and POST in forms, now it seems like HTML5 will do the same. There is a proposal to add these two but it doesn't seem to be gaining traction. What were the technical or ...
2
votes
1answer
87 views

Javascript and HTML decoupling

Based on the following snippet HTML <table id="example" class="display" cellspacing="0" width="100%"> <thead> <tr> <th>Name</th> <th>Position</th> ...
3
votes
3answers
167 views

How is rendering a Word document different from rendering a website? [closed]

Now, it doesn't necessarily have to be Word — for ease of comparison, let's use ODT, which is based on XML — which is pretty similar to HTML. That would, to my mind, make rendering an ODT ...
0
votes
2answers
193 views

How to make a website be formatted correctly on all screen sizes? [closed]

I recently made a pure (didn't use Bootstrap or anything else) HTML 'website' (didn't actually give it a url) on my laptop, but when I opened the website on my desktop, it looked horrible and nothing ...
0
votes
0answers
105 views

Generating dual .xlsx files and .htm pages of the same data

Here are my requirements: Generate Excel reports for users, attaching them to emails Additionally, insert hyperlinks into those emails where the user can view the same report on a web page. I have ...
2
votes
2answers
122 views

Will Web Components in HTML Add Too Much Complexity? [closed]

The way I've been accustomed to User Interfaces is to see everything as a div. Where a div is essentially a box and they can be stylized in CSS. <div class='container'> <div ...
1
vote
0answers
53 views

How can I properly classify elements?

I'm writing a webpage with a simple header, nav, body and footer layout. To style it, I wrote the following CSS: .mainSideBar { position: relative; display: inline-block; vertical-align: ...
1
vote
3answers
299 views

Javascript Password Security [closed]

I am having difficulty with the answer provided here, but I couldn't understand how to implement it. My code is pretty much identical: <script language="javascript"> function check(form) { ...
5
votes
3answers
319 views

Comparing two large strings to see how much they match [duplicate]

Is there an easy way of comparing any two different size of string text to see how much percentage they're alike? I'm trying this but I'm running into to this issue below. The left text area is the ...
0
votes
1answer
51 views

Turning an HTML template into a Django template

When you purchase an HTML template, usually everything is mixed in together... html, css, images and js. An example template may look like this: account.html category.html contact.html /fonts /img ...
-1
votes
2answers
93 views

Is there any danger in rendering user-entered HTML and can it be mitigated?

I'm guessing the answer is no because there's quite a few examples, including right here. If I let users submit their own HTML text and then render it side by side, what could the user do that would ...
0
votes
0answers
133 views

How does postback url works in campaign tracking systems?

my question is theoretical, a vague idea or some sort of algorithm will be great. I am building an advertising campaign tracker web app for a friend, yet i am kinda lost, i cant figure out how the ...
42
votes
8answers
6k views

How do I get started with HTML5? [closed]

What is the recommended workflow to learn HTML5? What tools should I install? What SDK? Where to start? How to test? How to debug? What do I read? I understand that what is often labelled as "HTML5 ...
166
votes
8answers
58k views

Why are people making tables with divs?

In modern web development I'm coming across this pattern ever more often. It looks like this: <div class="table"> <div class="row"> <div class="cell"></div> ...
2
votes
2answers
132 views

Should a parent CSS class be added to the markup or @extended?

Reading SASS basic features on their website, I stumbled upon the @extend feature. The example they give is the following: .message { border: 1px solid #ccc; padding: 10px; color: #333; ...
0
votes
2answers
335 views

Shopping cart in PHP : Sessions or Database? [closed]

I am currently developing a simple shopping cart using PHP & HTML. I've been having troubles with using the SESSIONS in Php like: Sessions not continuing when I switch pages even though I ...
0
votes
3answers
146 views

Would it be possible to transfer an HTML file using a protocol different from HTTP?

I am reading about internet and stuff and just learned that web pages are really just HTML files. Also, I have learned that HTTP is just a transfer protocol. So my question is, would it be possible ...
0
votes
0answers
25 views

How http-caching works with form element?

As per MDN, the attributes only supported by form element are: accept-charset, action, autocomplete, enctype, method, name, novalidate and target. With the help of http response header properties ...
85
votes
5answers
73k views

Two HTML elements with same id attribute: How bad is it really?

Just browsing the google maps source code. In their header, they have 2 divs with id="search" one contains the other, and also has jstrack="1" attribute. There is a form separating them like so: ...
4
votes
6answers
993 views

Is it advisable to force your web server to parse HTML files for PHP code?

I can't remember what site I glanced over and picked up that tidbit, but someone suggested that you should keep PHP parsing to .PHP files, and not modify one's webserver's htaccess to include PHP ...
0
votes
1answer
592 views

develop crossplatform GUI based DESKTOP application with HTML5/CSS [closed]

I'm experienced wed developer doing stuff for web for a several years. But now my customer need to build crossplatform ETL tool which he want to ship to his clients. And will be much easier if it will ...
15
votes
1answer
457 views

Is progressive HTTP download a viable alternative to HLS/DASH/RTMP for providing live video?

I'm working on a website that needs to stream live video to users, and as such I've had to get my head around the sorry state of current browser-based video-streaming technology. The most popular ...
1
vote
0answers
113 views

Are facilities that generate HTML for you, considered harmful? [closed]

I will approach this from two directions (+ raw HTML itself being de-facto third) Proprietary HTML-generating code Code generating facilities provided by a popular library Proprietary ...
3
votes
3answers
153 views

Is the `<table>` tag and `display:table` a functional or a layout directive?

Background I've always disliked the idea of using the CSS property of display:table. Using it feels like an ugly hack and I always prefer to use a direct <table> tag instead. Of course, I use ...
0
votes
1answer
122 views

PHP MySQL unique user data [closed]

I'm trying to create a php website that users log into and they can submit data to a MySQL database. How do I make it so the users can only see data they've submitted and not everyone else's data? ...
2
votes
2answers
215 views

Is there anything wrong with putting comments in an HTML closing tag?

I often write comments like this <div id="wrapper"> ... </div> <!-- id="wrapper" --> But what if I wrote them like this? <div id="wrapper"> ... </div id="wrapper"> ...
0
votes
0answers
96 views

Correct way of running methods from frontend in an OOP framework

If I have a link to change language of my website, where should that link lead in order to execute a PHP command, specifically in Codeigniter framework? I am interested in the most recommended, DRY ...
8
votes
2answers
2k views

Is localStorage under The Cookie Law?

I'd like to avoid having the cookies banner on my websites where possible. Could I store session id's in localStorage to bypass implementing the banner?
8
votes
4answers
10k views

Patterns and practices for Web Scraping in .Net (C#) [closed]

I will be putting together an application to automate an external web site/application. In some instances I will need to navigate the site as a user would (some links I need to follow cannot be ...
0
votes
1answer
267 views

Best Practices: URL Path Parameters [closed]

What's the current best practice around path parameters in URLs? For instance /artist/name A long time ago I might have made artist.html and then passed in a query parameter /artist.html?name=name ...
5
votes
1answer
343 views

How should I test the HTML output my class creates?

As a learning project, I am trying to create something similar to the WebGrid that comes with ASP.NET MVC. Now this component MyGrid<T> looks like this: public class MyGrid<T> where T : ...