Most voted "html5" questions
HTML5 (Hypertext Markup Language, version 5) is a generic term for recent web technologies (HTML, CSS, and Javascript). It is also the latest iteration of the HTML Recommendation scheduled for 2014, and featuring new elements and Apis.
Learn more…3,881 questions
Sort by count of
-
69
votes8
answers13920
viewsIs <br> or <br/> or <br />right?
I see each one using a way, I even vary the shape in a few moments and all work, but what is the right one? It depends on HTML version or the browser?
-
57
votes4
answers16863
viewsCross-browser way of copying text to the Clipboard (Clipboard)
I’m looking for ways to copy a text to the clipboard (Clipboard) via Javascript, which works on most modern browsers, but there is too much information and seems to me outdated. I know there is a…
-
50
votes3
answers8505
viewsWhat is the semantic difference between <em> and <Strong>? Do they replace <i> and <b>?
They say the element <em> should be used for emphasis, and the <strong> for even more intense emphases. This seems rather confusing. When and why use each of them? And <i> and…
-
49
votes7
answers21565
viewsWhy is the use of frames and iframes considered bad practice?
Well, I started developing WEB a short time ago, say 1 year. and here in the company we use a lot frames and iframes... I know that in the HTML5 view frames are obsolete, but I still see a lot of…
-
47
votes3
answers12057
viewsDifferences between localStorage Vs sessionStorage?
What are the differences, pros and cons between localStorage and sessionStorage?
-
43
votes2
answers6588
viewsHow can I pause and play a gif?
I want to put on my site, a system like 9gag, where people can pause and give play in a .gif. I know I have to use two images, one .jpg and a .gif, but tried some functions and could not. I found…
-
40
votes2
answers4961
viewsHow to use such semantic tags?
Since the release of HTML5, I have noticed that several different tags have started to "emerge". Everywhere I tried to study on the subject, I always saw the expression "semantics". I understood…
-
40
votes2
answers897
views<br> is obsolete?
With the advent of responsive/adaptive/fluid layouts, the use of <br> to define layout spacings. Using it is not recommended in these modern layouts or is it just a matter of programming…
-
37
votes9
answers34793
viewsInput type="password" with password display eye
I need to put a <input type="password"> with that eye of the reveal password, but it has to work as follows: User clicks on the eye and when dropping hides the characters again. Follow an…
-
36
votes4
answers39339
viewsHow to apply readonly in a select?
I believe most of you here know the difference between readonly and disabled. Select Readonly The readonly does not apply properly to the select <select name="field" readonly="readonly">…
-
33
votes9
answers9696
viewsIs it right to use the <i> tag for icons and not italics?
Currently we have noticed that many people have been using the tag <i> for icons and not for italics. If we were still in the pre-HTML5 era this would be totally wrong. According to the…
-
30
votes2
answers22530
viewsHow to capture a photo through the user’s webcam and send via POST?
How to perform the user’s webcam image capture procedure on a registration form to submit via POST? I am looking for a solution that is compatible with most browsers and that is simple to implement.…
-
29
votes1
answer1130
viewsWhen using async and Defer, is the order of the scripts respected?
For a single script, the load/run order in presence or not of attributes async and defer is clear: with nothing, loads and executes immediately, with async loads in parallel and performs at the end…
-
28
votes4
answers62720
viewsHow to style a "file" input?
I have this structure: <section id="cadastro" class="cadastroVersao pg-i"> <div class="titulo"> <h1><i class="icon-clientes"></i>Cadastro de versão</h1> <a…
-
28
votes5
answers2672
viewsWhat is the </datalist> tag for?
When I was using Sublime Text to edit a file html, I realized that he suggested a tag with the name of datalist. I had never seen about this tag before, but it seems that really exists. As I did not…
-
27
votes4
answers17158
viewsInclude another HTML file in an HTML file
Setting: I’m putting together a layout, which will be used by third parties and I don’t know what language will be used. I have two Ivs, one will be the left menu and the other the content. They are…
-
27
votes3
answers14943
viewsA Base64 image loads faster than a url?
I am developing a page where I need to have the images displayed only after loading them. And, not to leave the space of the empty images, I thought to use some image of "Loader". So, I thought that…
-
27
votes2
answers599
viewsSite made for seniors? Is there any good practice to build pages for seniors?
I am with a doubt, subjective, like almost everything in UX. But I will start from a feasible scenario. Imagine the INSS website, which is supposed to be a site made for the elderly, people who have…
-
24
votes7
answers16899
viewsHow to create a <select> with images in the options?
I thought I could make one select simple html with image, but does not work. I’m starting to think it’s a problem with modern browsers or HTML5. CSS select#gender option[value="Prima"] {…
-
22
votes6
answers34688
viewsHow to send emails only with HTML5 basics
I am building a website to be hosted on a server that does not support PHP or other server-side language. I need to send the values of a contact form by email and my resources are only HTML5 and…
-
22
votes3
answers24286
viewsWhat is the difference between <div> and <Section>?
I was reading here about the element <section>. I read the specification, I read some articles about, and I still can’t understand what benefit this element brings that is no longer covered by…
html5asked 10 years, 6 months ago Oralista de Sistemas 23,115 -
21
votes6
answers18042
viewsHow to make a Custom Scrollbar?
How to modify a scrollbar div, to appear as in the image example below (Hangouts), instead of the standard operating system scrollbar?…
-
21
votes2
answers868
viewsWhat is the purpose of alt in a <img /> tag?
Studying on HTML5 I came across the property alt being used in tag <img />. Example: <img…
-
20
votes1
answer2647
viewsWhat are HTML5 Aria-* attributes for?
I have seen, since the release of HTML5, several attributes aria in HTML tags, for example aria-disabled, aria-required, aria-readonly, among others. What are they for?…
-
19
votes4
answers9578
viewsWhat is the modern alternative to framesets?
I know that the frame that used to load some pages in a single one is no longer used, in the internet there is a vast content saying that this is obsolete. But what would be the ideal alternative to…
-
19
votes1
answer5560
viewsAbout the boolean attribute Defer and async vs optimization
The use of async and defer for optimization is a good subject to touch when we want pages loaded more quickly and also without blocking problems. Doubts: Using async, if the browser does not…
-
19
votes3
answers1712
viewsWhy is it considered wrong/bad to repeat an HTML ID?
I think the title says it all, why is it considered wrong to repeat HTML Ids? I notice a lot of people doing things like: <div id="foo">bar</div> <div id="foo">baz</div> To…
-
18
votes1
answer4077
viewsWhat is the difference between the elements <img>, <picture> and <figure>?
In HTML we have the elements <img> (image), <picture> and <figure>, which I believe to be a "figure" or "image". The img is well known, the others have been introduced recently. I…
-
18
votes3
answers1673
viewsWhen should I use the </img> tag or the background CSS property?
When should I use a tag </img> HTML to display an image? And background-image CSS? Factors such as accessibility and browser support can influence choice?…
-
18
votes3
answers421
viewsTo observe an error in the iframe element with "sandbox" attribute
I have in my document one iframe with the attribute sandbox. With javasript i do reading a file Markdown and parse using the library showdonwjs and add that result to the attribute srcdoc of iframe…
-
17
votes2
answers1662
viewsIn HTML5, should null elements be closed with ">" or "/>"?
In HTML 5, there is a series of null elements, which according to the specification (English) and examples given (English) by W3C, they are closed using only >: Elementos Nulos area, base, br,…
-
17
votes2
answers18486
viewsWhat is the Role attribute for?
I’ve seen a code that had that tag on it Role in a form, but I didn’t understand its use. Something like: <form role="search"> </form> What’s the tag for role in HTML5 ?…
-
17
votes1
answer407
viewsIs it possible to use the autocomplete attribute in "textarea/select"?
I know the attribute can be used in the element input <input type="text" name="email" autocomplete="on" /> According to the MDN Web Docs, the element textarea includes the global attributes to…
html5asked 6 years, 7 months ago NoobSaibot 9,554 -
17
votes1
answer3079
viewsHow does Cubic-Bezier work in CSS Animations?
When we make an animation with CSS we have several parameters that we can use. Ex: animation-name: none animation-duration: 0s animation-timing-function: ease animation-delay: 0s…
-
16
votes2
answers1907
viewsHow to work with websockets
I’m trying to use Websockets in PHP and Javascript and I’m confused, it uses the protocol Ws:// and wss:// and the server (hostgator) does not have these protocols enabled (I think!) and I can’t get…
-
16
votes2
answers319
viewsHow do CSS ignore if the attribute is capitalized or lowercase?
Imagine I have a situation where I need to style multiple links from my page, but only the links that end in .html, but I noticed that when trying to get the attribute href, I can only catch the…
-
15
votes3
answers7499
viewsHow to fill in a numerical field as in internet banking (right to left)?
At Atms and internet banking sites there are numerical fields that when you type they are filled from right to left, increasing the number as you type, for example: +-----+--------------+…
-
15
votes3
answers973
views -
15
votes2
answers39989
viewsWhat are data-target and data-toggle attributes for?
I need to know what those two attributes are for data-target and data-toggle who stay in inputs, buttons and similar in HTML?
-
15
votes2
answers243
viewsWhat are Variable Fonts? How do I work with them in CSS?
I’ve heard enough of the term Variable Fonts, and that this would be a new standard that the Web should adopt as a whole soon... I do not know if this really proceeds, but it seems that this new…
-
14
votes2
answers1581
viewsDifference between method ". attr()" and ". date()"
I notice that there is a difference between updating or applying an attribute data using the jQuery method .attr() and the method .data(). The examples below can be seen in this Jsfiddle. Apply…
-
14
votes1
answer23562
viewsShow GIF while page loads
I need a GIF to stay working while the page loads. I’ve tried a few ways but none worked. And when the page loads, the Completed!. More or less as it happens on this website.…
-
14
votes1
answer1965
viewsHow does the HTML5 <template> element work?
Recently I saw some news about a new HTML element called <template> specified by W3C and which has already been implemented in most modern browsers. Apparently it allows the creation of custom…
-
14
votes4
answers1112
viewsIs there an XHTML5 (XHTML + HTML5)?
XHTML is HTML with strict syntax (must be a valid XML). I can use it in conjunction with HTML5?
-
14
votes3
answers1336
viewsWhy can’t I center image using text-align:center?
Follow the code below: HTML <div class="panel panel-default" style="height:400px"> <div class="panel-body"> <div class="form-group"> <div class="col-xs-6"> </div>…
-
14
votes1
answer3877
viewsWhat is the history.pushState function for?
I realized that the object history has some relationship with browser history handling. There are methods like go and back which are more understandable, but do not understand very well what makes…
-
14
votes4
answers994
viewsWhy does Input Type Email validation accept pointless domains?
The input type[email] is intended to validate whether the field is being filled with a valid email. But several times I have gone through questioning in some projects about why this field accept…
-
14
votes1
answer697
viewsHow does the <dialog> tag work? Does it have a future?
Some time ago, reading some articles on HTML5, I learned about the existence of the tag <dialog>. I was curious to know how it works, because currently when it comes to dialogues (also known…
-
14
votes2
answers1129
viewsWhat is the purpose and how to use the "display: Contents" of the CSS?
I recently saw that there is a new kind of display in the CSS the display: contents, but I didn’t quite understand the intention of using it? https://developer.mozilla.org/en-US/docs/Web/CSS/display…
-
13
votes2
answers36925
viewsChange the "placeholder" color without affecting the "value" color
In HTML5, we can make use of the attribute placeholder (English) in order to give the user a hint about the type of data that a given field accepts. To avoid confusion between data actually written…