Most voted "html" questions
Use this tag when the question refers to some resource, information or problem related exclusively to the HTML language (Hypertext Markup Language). HTML is the main markup language used to structure web pages and format content. The latest revision of the HTML specification is HTML5.
Learn more…14,259 questions
Sort by count of
-
12
votes3
answers18362
viewsHow to preview a loaded image in an "file" input?
Description: I have an example here of how my system is working. EXAMPLE LINK HTML <input type=file> <input type=button class=hide value="Adicionar outro"> JAVASCRIPT function…
-
12
votes2
answers33836
viewsVertical alignment of text with CSS
How can I align this text "Adopt the rhythm of nature: her secret is patience", vertically and horizontally within the white field? I used the following code: <ul> <li> <a> adote o…
-
12
votes4
answers80887
viewsHow to force the opening of a link in another tab and not window?
I have a button (anchor) that needs to be 'hidden', or no text. Its structure is this: <a class="testeimprimir" href="javascript:teste1();" target="_blank">TESTE</a> The Function is…
-
12
votes4
answers2204
viewsHow to get page load percentage?
How to get the size of a page and how much it was downloaded to calculate the percentage of its load. But I would like to not use any framework, only pure JS. I really want to try that.…
-
12
votes2
answers189
viewsAre libraries downloaded multiple times?
I have an application that uses 3 libraries (Bootstrap, jQuery, jQueryUI) on 10 different pages. Browsers cache libraries?
-
12
votes3
answers68478
viewsDisplay PDF file in the body of the HTML page
I am creating an HTML page and would like to know if it is possible to display a PDF file in the body of the page, so that it can be viewed without having to open the file or download. Or I will…
-
12
votes4
answers20055
viewsHow to open a pop-up without using Javascript?
How to open a pop-up without using onclick or any other Javascript function?
-
12
votes4
answers24420
viewsTurning HTML into PDF
I noticed that on the website of Banco do Brasil it is possible to choose the output format of a voucher txt, pdf, csv without the need to resubmit the page. Is there a library that converts the…
-
12
votes1
answer832
viewsWhat is the baseline?
Studying Flexbox (layout type in HTML/CSS), I came across this concept of baseline, I’ve never seen before: align-items ... ... baseline: items are aligned so that their baselines line up Looking…
-
12
votes2
answers6437
viewsOpen Whatsapp when you click on the icon
Does anyone know how to make that by clicking on the Whatsapp icon on a website by smartphone, some function open the application and already start a conversation at the number set in link of the…
-
12
votes2
answers3131
viewsHow can I turn line breaking into <br /> in Javascript?
In PHP, we can convert a line break to a <br/> through function nl2br. What about Javascript? How can I do this safely? I decided to ask the question because I don’t know if a simple…
-
12
votes4
answers4310
viewsEnter key do not give Submit
How to make the enter key fail Submit on a form? Example: in an input by pressing the enter nothing happens. Today I press the enter, the browser gives a Submit, as and had clicked on send button.…
-
12
votes2
answers2820
viewsWhat’s the difference between @import of css and html Link?
I created a file containing css that are used in my system. I wonder what is the difference between calling css by link or by @import thus: /* ou dentro do codEventos.css */ @import "../padrao.css";…
-
12
votes1
answer3813
viewsWhat is the "application/Ld+json" type for in a <script> tag?
I was looking at the source code of the Kickass page and this excerpt caught my eye: <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "WebSite", "url":…
-
12
votes2
answers11304
viewsWhat are the differences between the values "en" and "en-BR" of the lang attribute?
I was unable to notice any difference between both values in the tests. Does anyone know? To help: the first two characters of the value define the Language Code Reference (ISO 639-1) and the last…
-
12
votes1
answer1018
viewsMinify HTML code
It is normal to see minified Javascript files, for performance gain. Today we see some sites that minify everything, including the code itself HTML, as an example east of here. (use the option to…
-
12
votes3
answers10007
viewsA3 Digital Certificate, e-CPF, how to access information with Javascript
I am having to develop an application, which for security purposes, it is necessary to use an e-CPF by users when trying to log in. I just need to check if the e-CPF number matches the registered…
-
12
votes1
answer8949
viewsList states, cities and neighborhoods on registration form
I have a table called "ad", where I need to register the information coming from other 03 tables, are they: Tables of States, Cities and Neighborhoods. The objective is that the user himself makes…
-
12
votes2
answers596
viewsHow to animate the display of dynamically sized elements with CSS only?
I’m building a site that has some state transitions using CSS only. In one of them the user clicks the header and the div below displays or hides. In the other there is a sequence of images and when…
-
12
votes3
answers307
viewsIs there a difference in performance between "echo" content and HTML content?
The use of echo PHP to display on the screen any content differs in performance to use this same content directly in HTML? For example, if I use a PHP file: <?php echo "<p>Seja bem-vindo ao…
-
12
votes3
answers556
viewsAn image with display:None is loaded? Consume data?
I’m developing a layout responsive and would like to decrease the size of the images according to the resolution. I used the display: none but saw in the inspetor de elementos that it is being…
-
12
votes5
answers357
viewsHow to dim the blue light on a website?
I am developing a website, and would like to dim the blue light (as night mode), however, I have not found a way to do this. Is there any means by CSS, JS or some other language?
-
12
votes3
answers1595
viewsIs it bad practice to put numbers as id in HTML elements? If so, why?
I have a loop printing HTML elements, for example: for($i = 0; $i < 3; $i++){ echo "<div id='$i'>$i</div>"; } Is it bad practice to put numbers as id in HTML elements? If yes why?…
-
12
votes2
answers319
viewsDocument.getElementById('ID'). func(....) vs ID.func(...)
Yesterday I came across a curious thing, I had no idea you could do it this way. Until now I did it this way: document.getElementById('a').innerHTML = 'CONTENT'; <div id="a"></div> But…
-
12
votes3
answers6427
viewsStyle input type='number' to change arrows
How to customize the input type='number' as the image below? Click on the +/- sum or subtract the number inside the box. Currently my code is: .bedrooms = f.input :bedrooms, :label => false, as:…
-
12
votes1
answer3245
viewsPseudo elements ::after and ::before work on which input types
I wonder if there is any documentation or article that says where exactly we can use ::after and ::before I’ve seen that tag <img> for example does not work. I believe it does not work because…
-
12
votes3
answers10029
viewsinnerHTML VS innerTEXT
What’s the difference between using the innerHTML and the innerText in Javascript? If I want to change the content of TEXT_NODE, Which one should I use? For example: <p id="p1">I also wrote a…
-
12
votes2
answers617
viewsHow to customize the default <Details> arrow?
I’m using the HTML5 tag <details> so that the user, when clicking, visualizes some information of a given word. For example: <details> <summary>JavaScript (Clique…
-
11
votes2
answers1010
viewsHow can I simulate a placeholder using a label?
I’m trying to get the label simulate a fixed placeholder. The biggest difficulty is changing the properties of label when the input receives the focus, and the input fill in the rest of the space…
-
11
votes5
answers10769
viewsHow to mark and unmark a row from a table by clicking on it?
When clicking on a row of a table, how to mark it by changing the color of the row background, and if you click again uncheck the background, and if you click on another row uncheck the old checked…
-
11
votes7
answers3042
viewsHide input value
I need to hide/remove the value from my input, but I’m not getting it at all, where am I missing? Thank you very much HTML: <div class="caixa-pesquisa"> <div…
-
11
votes1
answer1299
viewsNo return of geolocation using Phonegap
I’m using the code to pick up the geolocation of the Phonegap, but even so, when I emulo the app, it returns me nothing. There is something wrong in the code? index.html <html> <head>…
-
11
votes1
answer21808
viewsE-mail with PHP attachments
I am sending an email, everything works fine. Now I wanted to add some files as an attachment. I have the following code: $from = $_SESSION['email_cliente']; $email_destino = "[email protected]";…
-
11
votes1
answer25900
viewsIs it possible to create Android apps using HTML5?
I really wanted to start developing applications for Android phones, but I have almost no knowledge about the operating system SDK, I have more knowledge about HTML, Javascript, CSS. I have in mind…
-
11
votes5
answers17141
viewsIgnore CSS on a particular page snippet
Let’s assume I have some CSS of the type: #foo input { background-color: black; color: white; /* seguem mais um milhão de propriedades */ text-align: center; z-index: 9000; } All input son of foo…
-
11
votes7
answers57425
viewsCheck/Deselect Checkbox from a button
I would like to use a button to mark/uncheck checkbox. I have this button that calls a function, look: <button class='btn btn-large' type='button' title='Todos' id='todos'…
-
11
votes1
answer99
viewsHow to create a "Glass pane" in Javascript?
I’m trying to create a "Glass malfunction" in Javascript, similar to supported by Java. The goal is to offer a kind of interactive help to the user, where information about each element is…
-
11
votes3
answers2648
viewsAutomatic calculation in text box
Good morning. Is there any way when the user type this in a text box: A script runs the account automatically and results, in this case=1 ? It is also important that it does this with all operations…
-
11
votes5
answers29209
viewsReset to input fields after Ubmit with Jquery
By sending input fields values via Jquery to a PHP page I can do the action without "refreshing" the main page but I can’t make input fields "empty" again?!? How to apply "reset" after submission?…
-
11
votes2
answers7980
viewsWhat’s that "Mr-only" Bootstrap Twitter thing for?
Studying the documentation I was left with doubts: for what really serves the class sr-only of bootstrap?…
-
11
votes3
answers3924
viewsInsert external video or HTML or JS into a div
On the site I’m developing, I’d like to call an external video within a div, just using the video ID. Example: https://www.youtube.com/watch?v=UJAwNkhbYWM In this case the video ID is this:…
-
11
votes3
answers14892
viewsfunction $.Ajax() return value?
that is the code: var res = VerFileRepetidoBancoAjax( "teste" ); console.log("res="+res); function VerFileRepetidoBancoAjax( str ){ $.ajax({ url: "caminho.", type: "get", dataType:"json", data:…
-
11
votes3
answers546
viewsSimulate placeholder in IE8
I was reading the documentation here and it seems that the attribute placeholder does not work in IE8. Would have some way to simulate the placeholder that you use? Example of HTML not working in…
-
11
votes2
answers992
viewsVoice link between two points
I would like to study about, read how it is done and all possible details about making voice calls between two points A and B Similar works these links between users like Viber, Whatsapp, facebook…
-
11
votes1
answer786
viewsBuild a "3D" building with HTML, CSS and JS
How can I play the image below using HTML, CSS and JS (maybe images)? The "floor" numbers are unpredictable and each "floor" should be "clickable", a <a href="#"></a>, or something like…
-
11
votes1
answer2038
viewsPlace text side by side
I don’t know if it’s possible, but I wonder if I can put a text divided into two columns?
-
11
votes1
answer1783
views -
11
votes3
answers4722
viewsHow to create a box with lines on both sides with CSS only
I’m looking for a help from where to start to be able to create a fully css structure as in the image below. I know this may seem very simple, but I can’t get you started.…
-
11
votes4
answers781
viewsHTML/PHP Detect if form value has been changed
I have a form where I can change things like username, password, morada, etc. On the site I also use a session (login) for each user, which is defined by username. The problem is that by changing…
-
11
votes2
answers262
viewsHow to parse syntactically malformed HTML?
As part of a procedure, I need to extract the contents of a table present on a page. I’m using Curl to get the raw HTML data and the Simple HTML DOM Parser to parse and process HTML. <?php //…