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
-
21
votes3
answers90884
viewsAttribute "href" for Javascript links: "#" or "javascript:void(0)"?
Popularly, there are two methods of creating links that perform a function in Javascript, are they: <a href="#" onclick="myFunction();">Executar JavaScript</a> or <a…
-
21
votes2
answers14288
viewsHow to disable a text field for editing using jQuery/Javascript?
Let’s say I have a form with fields 1 to 7. Something like: field-1 field-2 field-3 field-4 field-5 field-6 field-7 All these fields are in one form. With Laravel, sometimes I experienced situations…
-
21
votes5
answers2054
viewsWhy put Javascript, CSS, and images on another server?
On most sites I noticed that they use another server to load scripts, CSS and images. Because they use?
-
21
votes2
answers1671
viewsIs it possible to add an overflow behavior with scroll only in tbody of a table?
It is possible to add a behavior of overflow with scroll only in the tbody of a table and still not have to set fixed sizes in pixels, without having to separate the column header with the body, as…
-
21
votes6
answers65532
viewsSum in 2 inputs and appear in real time - Javascript
My question is the following: I have two inputs type text. One person put a number in input 1 and another number in input 2. When the person had just filled in, the result of adding the 2 inputs…
-
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
votes2
answers791
viewsHow to do Tilt button?
I am using img but it is not a good practice, so I would like to use a button with some css attribute. It is possible?…
-
20
votes4
answers6072
viewsHow to write code as an example, without running?
I’m doing the translation of a book to an HTML page, ai in the book has the codes, but how do I make my HTML display my code, HTML, PHP and Javascript, without running them?
-
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?…
-
20
votes2
answers8235
viewsHow to place a clickable area on a piece of an image?
I have this code on my website: .fixed-background { position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } img { height: auto; width: auto; min-width: 100%; min-height:…
-
20
votes2
answers5894
viewsHow and where does tabindex work?
Since I started programming, I’ve observed the use of tabindex in some specific elements. I understand perfectly that it has to do with pressing the button tab and the focus of the elements, but I…
htmlasked 7 years, 7 months ago Wallace Maxters 102,340 -
20
votes2
answers710
viewsHow could you make a Pacman by moving your mouth with pure CSS?
In order to go deeper into the CSS, I would like to know different ways of making animations. My goal is to know some new properties and features that CSS has been implementing. In the specific…
-
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
votes2
answers3101
viewsWhat does "region above the fold" mean?
On the page of google developers there are several citations to this term: "Structure your HTML to first load only critical content, from region above the fold" What would this region above the fold…
-
19
votes4
answers10808
viewsIs it possible to create a desktop application using only PHP, HTML, CSS and jQuery?
Although I know that PHP is a language for the web, I would like to know one thing. It is possible in any situation to create an application, system or application with only PHP+HTML+CSS+jQuery that…
-
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
votes3
answers4829
viewsclick a play button on the Youtube iframe
I have a iframe of Youtube, and a div above it, I want when the user clicks on that div He plays the video. My HTML: <div class="p-relative"> <div class="botaoMaior"> <div…
-
18
votes4
answers2297
viewsIs it correct to use a table in the page layout?
I made a data table for a colleague of mine here at work and used a table, only it had no header, it had only 2 columns. And he told me that the staff hates table, which was for me to read about…
-
18
votes8
answers2700
viewsIs it good practice to mix Php and Html?
I see that in python, has the Bottle for example that does the same thing of what I intend to do then... I am new to web practices, student indeed and would like to know if I can use php and html in…
-
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
votes1
answer4514
viewsHow does "position: Sticky" work?
The sticky is a new property value position and I read a little bit and understood that with it it is possible to create HTML elements that behave at a time like position: fixed and in another as…
-
18
votes4
answers31300
viewsHow to disable resize from textarea?
How do I disable resize of a textarea ? <textarea></textarea> I wish I couldn’t change the size of the box...…
-
18
votes1
answer540
viewsWhat are HTML entities?
I often see some pretty crazy codes in the middle of tags HTML, and searching falls under that term entities, then the doubts arose: What are Entities HTML and when should I use them?…
-
17
votes3
answers1314
viewsHow to get around bad rendering of a font in Internet Explorer?
I’m using a font-kit generated on Font Squirrel and am getting different results on Mac OS X and Windows environment. Would there be some way around the bad or different rendering of the Internet…
-
17
votes8
answers45427
viewsHow to disable the scroll of a web page?
I’ve been trying to disable one-page scrolling. All I have found are type solutions: #container{ overflow: hidden; } But that’s just occult scroll bar. How I would disable scrolling, even with it…
-
17
votes3
answers9289
viewsHow to change the title of each PHP page dynamically?
I know almost nothing about PHP. Once a friend sent me a code that allowed me to separate my page into several parts and then pick up those parts again in case I change something in the scripts and…
-
17
votes3
answers4757
viewsHow do I make a Marquee without the <Marquee> tag?
I need to wear one Marquee, but as everyone is saying Marquee is a prehistoric thing and should not be used anymore, I am in doubt as to what to use in his place. On the site of MDN says this: This…
-
17
votes3
answers104158
viewsHow to solve a Notice: Undefined index?
Starting in PHP and following a tutorial I used the above code and ended up getting this error: Notice: Undefined index: Submit in C: wamp www mezzo-com reservas.php on line 3 How to solve it?…
-
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
votes4
answers847
viewsHow to generate indented code?
How to print indented code when I give one echo by PHP? let’s say the structure is like this: echo '<div>'. '<table>'. '<tr>'. '<td>'. '</td>'. '</tr>'.…
-
17
votes2
answers4066
viewsWhat are MIME types?
What are MIME types ? And what is its importance for correctly rendering pages/files? Its use is mandatory or depends on the browser ? If undeclared, browsers may assume a different behavior at the…
-
17
votes5
answers15911
viewsHow to make a circle in CSS without Border-Radius 100%?
I can make a circle in css with border-radius. .circle{ border-radius:100%; border:10px solid red; width:100px; height:100px; background-color:purple; } <div class="circle"></div> But I…
-
17
votes1
answer1818
viewsMeta tags for Social Networks
We know that it is necessary to implement specific meta tags in <head> of our websites to optimize content sharing on social networks such as Twitter, Google+, Pinterest and Facebook. For this…
-
17
votes4
answers23157
viewsIdentify if the device is pc or mobile and use a different code for each
I want it to be automatic if the person is on the computer display a code if they are on the phone display a different one. I do not want to change the resolution but all the content presented on…
-
17
votes1
answer805
viewsIn what language was HTTP written when implemented on the Web?
I want to know in which language HTTP was developed.
-
17
votes2
answers2414
viewsWhat is the purpose of the "id" and "name" properties of an HTML tag?
When we create a tag in HTML we can assign values to its properties, however, the property id and name, I realize that they are widely used and generally the values that are assigned to them are the…
-
17
votes2
answers2317
viewsWhat is Xpath and what is it for?
Opening Developer Tools in Chrome to copy HTML from an element <div id="teste">, saw that there is an option "copy Xpath" as shown below: When choosing this option, it sends the following to…
-
17
votes3
answers1870
viewsWhat is metadata for HTML documents?
I’m reading a book about HTML. Page 19 lists the Categories. Each element in HTML may or may not be part of a group of elements with similar characteristics. And then the categories of these groups…
-
17
votes4
answers1235
viewsDoes the order of CSS styles influence the render tree?
During the Paint from the document by the browser the order of the properties of the CSS classes may interfere in how we perceive the page’s "assembly"? Especially in slower connections, we…
-
16
votes3
answers1404
viewsHow to compare HTML elements by real z-index?
Given two arbitrary HTML elements A and B on the same page, how can I find out which one is "closest" to the user (i.e. if they overlapped, which one would obscure the other)? To css specification…
-
16
votes2
answers2406
views"margin-top" and "margin-bottom" overlapping, why?
I have three elements div: HTML <div class="wrapper"> <div class="box"></div> <div class="box"></div> <div class="box"></div> </div> CSS .box {…
-
16
votes5
answers21918
viewsHow to replace the <img src> of a small image with a large image?
Information: I’m trying to make a simple photo gallery. I want to show the large-sized image in the center of the screen. (Clicar em 0.jpg e mostrar em uma outra div 0Large.jpg) Problem: With the…
-
16
votes2
answers1842
viewsWhat is the Unicode (BOM) signature?
I noticed that sometimes Dreamweaver puts assinatura unicode (BOM) on some php’s pages, I have to remove most of the time so that there is no spacing on the display page and I’m not sure what it’s…
-
16
votes3
answers5987
viewsSave browser cache or not?
Hello, I tried a site I’m doing in Google’s Pagespeed Insights, and it suggests "Take advantage of browser caching". I wanted to know if it is really necessary and advantageous to store files in…
-
16
votes3
answers2341
viewsGood practices using CSS
What are the best practices in CSS to maintain código limpo, compacto and manutenível? Should a simpler and less rigid form of selectors be used? (Scenario: There’s a div with an image inside)…
-
16
votes2
answers1819
viewsHow to make a gif run only once?
I have a GIF and I want it to only run once, with no repetitions. Is there any way to do this? How?
-
16
votes1
answer1408
viewsPick width child element in Angular directive
Next I have a table fed by a simple routine. I need to make the scroll to tbody fixed. So far so good. I could do N shapes. To try to make the table responsive I am using a directive to calculate…
-
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
votes2
answers1705
viewsHide widget if empty
I have a div which is used to display alerts to the user: <div id="page-alerts" style="margin:25px 0;"></div> Problem Example in Jsfiddle For reasons of formatting, it contains margins…