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
- 
		124 votes4 answers35777 viewsIs HTML a programming language?It is not my intention to bring the confusion of others to the site, but it was my doubt (internal, of those things that one is sure and then someone comes and asks a question that messes with the… 
- 
		117 votes3 answers57155 viewsCharset iso-8859-1 and utf-8 compatibilization problemsThe 1st Image I use the charset=iso-8859-1 In this 2nd image I use utf8 I have a news system where you can paste html or text from other pages. On the page where the news are presented I use the… 
- 
		108 votes4 answers48488 viewsWhere should I put a Javascript code in an HTML document?Where Javascript code should be placed in an HTML document: in the element <head> or <body>? At the beginning or end of each one? Is there any difference in performance or any other… 
- 
		82 votes5 answers86551 viewsUpload a file with AJAXI wonder if there is any simple way to upload files via AJAX + JSON. If there is, what would it be? 
- 
		73 votes18 answers139957 viewsWhat is the best way to center an element vertically and horizontally?What’s the best way (by "better" I mean: with the greatest possible compatibility between browsers and the simplest possible) to position an element in the center of the page, vertically and… 
- 
		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? 
- 
		64 votes3 answers1321 viewsWhy is it not recommended to use "_" (underscore) in HTML/CSS?I’ve seen people recommend never using _ (underscore) in HTML and CSS. Instead, we should give preference to -. Example: // Errado <div id="minha_div" class="minha_classe"></div> //… 
- 
		57 votes2 answers3691 viewsWhat is DOM, Render Tree and Node?I’m a beginner in JS and try to understand the theory, but all the articles I find on DOM are too "scientific". There wouldn’t be a simpler way to explain this to a "layman"? 
- 
		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 answers1078 viewsWhat is the impact of changing the default behavior of an HTML element?Recently there was a question here on Stack Overflow about changing the default behavior of checkbox to act on the page as a radio, that is, when selecting an item, the others should be unchecked,… 
- 
		43 votes4 answers1480 viewsWhat is the correct way to simulate a <script> with a new language?Suppose I implemented a new language and I have a functional interpreter written in javascript. Something like mylang.interpret(code_as_string). Now I would like to create an interface in which I… 
- 
		41 votes4 answers60985 viewsDifference between :disabled and :readonly in HTML?Usually both have similar behaviors when rendered in the browser. If I open an HTML with this: <input type="text" value="tente me alterar" disabled> <input type="text" value="tente me… 
- 
		40 votes6 answers20110 viewsHow to center the content of an element vertically?I’m trying to center vertically the content of an element that has position: absolute. I was able to move the content from half down container, however, from half up the space is "left". How can I… 
- 
		39 votes8 answers61967 viewsShould I use input type="Submit" or button type="Submit" in forms?I usually use <button type="submit"></button>, but I see in most forms the use of <input type="submit" />, is there any difference? What is the ideal?… 
- 
		37 votes1 answer3274 viewsWhich CSS selector has priority?I have the following code HTML and CSS: #element p{color:blue;} .element p{color:red;} div p{color:pink;} div.element p{color:yellow;} div[name="element"] p{color:purple;} div… 
- 
		37 votes3 answers10654 viewsHow to make a progress bar ranging from 0 to 100% with CSS only?I am developing a page where there is a progress bar and I need to make it start from 0 and go to 100%. But I only need to do it with CSS and, in addition, I need that when it reaches 100%, start… 
- 
		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">… 
- 
		34 votes9 answers166445 viewsHow to hide/show a div in HTML?How do I make a Javascript that shows/hides a div in HTML? I tried like: function Mudarestado(divid) { var disp = document.getElementById(divid).style.display; disp = "none; // (ou disp = "block") }… 
- 
		33 votes3 answers154319 viewsHow to center horizontally one div within another?How can I center a horizontal div that is inside another div using only CSS? In this case, we can assume that div external outer has a width of 100%. <div id="outer"> <div… 
- 
		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… 
- 
		33 votes3 answers21328 viewsCreate HTML element with Javascript (appendchild vs innerHTML)Recently I’m creating a lot of HTML dynamically. Example var table = document.createElement('table'); table.style = 'width:500px;border:1px solid #CCC;'; var tbody = document.createElement('tbody');… 
- 
		32 votes1 answer3647 viewsWhat is shadow DOM?When I was reading about some Javascript frameworks, for example the React, I read the expression a few times shadow gift in some articles. It even seems that it is possible, in Chrome console… 
- 
		31 votes5 answers14927 viewsHow to not allow a character to be typed in the textbox, with Javascript/jQuery?I have a Textbox: <input type="text" name="indice" class="number"> I wanted that when a person typed a comma in this Textbox it would be blocked and not appear in the Textbox. How to do it the… 
- 
		31 votes2 answers843 viewsIs it really necessary to put "text/javascript" in the <script> tag?We are in 2016. I have read in some places on the internet that it is no longer necessary to use this statement type="text/javascript". In fact, use the tag script without declaring this excerpt… 
- 
		30 votes1 answer21527 viewsWhat is the function of the X-UA-Compatible meta tag within HTMLCould you tell me the function of this meta tag within an HTML document? <meta http-equiv="X-UA-Compatible" content="ie=edge"> 
- 
		29 votes8 answers95476 viewsHow to check with jQuery if there is a checkbox checked?I would like to know which Checkbox is checked with Jquery. To catch all the checks I made the following code var checado=false; $(obj).find("input[name='analisar']").each(function(){… 
- 
		28 votes10 answers68840 viewsHow to make a <div> occupy the entire page width but leave a gap of a few pixels on each side in CSS?I’m trying to make a header that should fill the entire page width, but leaving a 5px gap on each side. For example: | ::::::::::::::: | | ::::::::::::::: | In this case the Pipes are the maximum… 
- 
		28 votes2 answers3688 viewsWhat are the advantages and disadvantages of minifying Javascript scripts?And which mini-guards can I use? 
- 
		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 votes6 answers2843 viewsWhat is the correct term to call someone who makes HTML code?HTML - Hipertext Markup Language We all know that HTML is a text markup language and not programming, but what would be the correct term to call someone who is writing in HTML? Could we say that he… 
- 
		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… 
- 
		28 votes3 answers466 viewsComments weigh in?Comments weigh? I leave comments throughout my code, will influence something on the site? I’m saying more specifically in HTML, CSS, Javascript, PHP. 
- 
		27 votes6 answers23686 viewsDifference between absolute and relative Urls in page contentsThe contents of the page can be requested by entering a complete URL, relative or relative to the root of the location where our base file is located (generally the index.php or index.html):… 
- 
		27 votes9 answers37388 viewsWhat should I use in CSS, id, or class?I started practicing html and css and some questions arose: When creating a style for an HTML element what should I use in CSS, class or id? What are your criteria for choosing what to use in CSS?… 
- 
		27 votes4 answers17158 viewsInclude another HTML file in an HTML fileSetting: 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 votes2 answers576 viewsWhy shouldn’t Regex be used to handle HTML?I understand that if I try to use Regex over HTML, HTML tags will drip from my eyes like liquid pain, among other horrors. And that I should use an XML parser or something like. My curious child… 
- 
		26 votes2 answers14336 viewsSome way to style "parent" element with CSSHello, is there any way to select the parent element of another element with CSS? To be more specific, I’m studying on localhost using the phpBB3 forum platform, when a message is thankful it wins… 
- 
		26 votes4 answers5242 viewsWhat is the priority of HTML? "id" or "class"?I would like to know if HTML is a priority id or class. For example, if I’m assembling my structure and do the following: <div class="teste1" id="teste2">TESTE</div> What will he do?… 
- 
		26 votes2 answers19823 viewsWhat is the difference between htm, html, dhtml and ghtml?Sailing in our "deepweb", I noticed some variations of the URL extension in the browser on some simple pages. For example on the globe with., which for some cases is .ghtml. For some time I imagined… 
- 
		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"] {… 
- 
		24 votes3 answers2397 viewsWhy does "Return false;" in a click event cancel the link opening?Why the return false prevails over, for example, a href? We have as an example this code: <!DOCTYPE html> <html> <head> <title>Uma página linda</title> </head>… 
- 
		23 votes2 answers29551 viewsSimple paging in jQuery/JavascriptI’m looking for a simple pagination, no CSS styles, nothing like that. Only with the buttons below to change page and with the elements on top. I’m asking because the examples I find are a little… 
- 
		23 votes2 answers4157 viewsWhat are <head> meta tags and what are they for?What are the meta tags contained in <head>? What they are and what they serve and what are the pros and cons of using them? Example: <meta charset="UTF-8"> <meta name="description"… 
- 
		23 votes8 answers44013 viewsHow to remove auto complete input from google Chrome?I want to remove yellow background when this enabled auto complete from Google Chrome. I tried to disable auto complete by applying: autocomplete="off" and I was unsuccessful. The top image is the… 
- 
		23 votes6 answers15200 viewsWhat is and how does Bootstrap work?I did some research, but most of the articles I found are based on the assumption that the reader already has some familiarity with frameworks (which is not my case), that I still have only a vague… 
- 
		23 votes4 answers23311 viewsForce Javascript File Update Without Disabling CacheIn a large-scale web application I develop there is a disorder every time updates happen, because browsers, especially Google Chrome, do cache of Javascript files and, sometimes, incompatibilities… 
- 
		23 votes2 answers368 viewsHow do I do SEO?I started a blog not long ago, but long enough to have visits, 2 months ago, but I don’t have any! And I’ve written 10 articles! They told me I had to invest in the site’s SEO unless I wanted to pay… 
- 
		23 votes1 answer975 viewsWhat is an SVG?Nowadays, we talk about image quality and always linked to this type of statement every now and again, this mysterious acronym appears. It seems to be SVG something really amazing, they say that… 
- 
		22 votes6 answers14122 viewsHow to simulate a higher resolution screen to check the behavior of a website?Is there any way to simulate a higher resolution screen to check how a website behaves? I currently use 1440x900 and need to test the interface at higher resolutions.