Most anwered "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
-
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…
-
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…
-
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…
-
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?…
-
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") }…
-
3
votes8
answers4914
viewsDo not allow saving image of a web page
I don’t want the "save image as.." option to appear when I right-click an image on an HTML page. That is, it will be impossible to save images from the site. How can I do this check?
-
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(){…
-
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…
-
7
votes8
answers5526
viewsHow to make a DIV fill all available width
I have two Ivs, one with a fixed width, 250px; which is on the left, will be a fixed menu, always on the left. And another div to the right that I want to make it 100%, whenever the user handle the…
-
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?…
-
4
votes8
answers12405
viewsHow to switch between true and false checked input?
I have this code and would like to switch between true and false the attribute checked input. Strangely is catching the id of label because the web designer superimposed the label at the input.…
-
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?
-
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…
-
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…
-
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…
-
1
votes7
answers175
viewsContact Form
I have this code to check if it is a numeric value and I have tried that the maximum value of digits is 9. I also tried with != or == What I tried: Option 1 //php verif phone…
-
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"] {…
-
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'…
-
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…
-
2
votes7
answers367
viewsIs there a problem if I leave a php file containing only HTML code?
I have a php file on my site that serves as a template for a single page of the site, within that file there is only HTML code, there is no php tag <?php ?>, or nothing. It’s like an html…
-
9
votes7
answers4205
viewsCount elements on the screen
I wonder if there is the possibility of me counting the elements on the screen, for example a function that lists the amount of <li> arranged on my website. How could I do that? And how would…
-
5
votes7
answers11400
viewsHow to validate phone in php
I’m trying to validate the phone number, both landline and mobile, and I’m trying to do so no matter how the user writes: 11965453789 (11)965453789 (11) 965453789 (11) 96545-3789 It will always save…
-
6
votes7
answers19300
viewsIncreasing modal size using bootstrap and html
I have a certain modal responsible for displaying some content of the site, however the content can not be adjusted to the modal screen, it always gets the same width regardless of the content ...…
-
0
votes7
answers4789
viewsForce input with a dot instead of an html comma
In the table the price field has the Decimal data type, where the input is this way: <p><h5><strong>Preço</strong></h5> <input type="text" id="Preco" name="Preco"…
-
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…
-
27
votes6
answers23686
viewsDifference between absolute and relative Urls in page contents
The 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):…
-
8
votes6
answers52587
viewsHow do I use a database on an HTML site?
I am interested in making a site that will use a database, many told me they use Mysql to do this, but I have no knowledge about it, installation, use etc. I have knowledge in PHP, HTML, CSS and…
-
12
votes6
answers8117
viewsHow to remove a "href" from a <a> tag with Jquery/Javascript?
I have a tag <a> with hyperlink properly set. However, I would like to remove it when firing from an event. The same tag has a properly set ID, too (unique, valid, and related). I wonder if…
-
15
votes6
answers3343
viewsMethods to test websites in different browsers?
I would like to know methods to test sites in different browsers, without creating virtual machines.
-
15
votes6
answers90846
viewsDo I use PHP inside an HTML or an HTML inside a PHP?
I made all my site in HTML and CSS, but now I need to use PHP to send some data to a database. I’m just wondering if I modify all my documents to . php or if I use PHP inside HTML (if possible).…
-
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.
-
1
votes6
answers19014
viewsI want to align my menu to the center
#menu ul a:hover{ background: #0186ba; background: -moz-linear-gradient(#04acec, #0186ba); background: -webkit-gradient(linear, left top, left bottom, from(#04acec), to(#0186ba)); background:…
-
10
votes6
answers4316
viewsKnow number of checkbox selected
How many checkboxes is being selected and count. Selected 1, mark 1, selected another mark +1, took 1 mark -1. I would like to count.
-
15
votes6
answers21826
viewsHow to remove auto-fill inputs?
I have my email input/password. But always when typing an email that I have already saved login/password, the browser automatically fills in my form. How to solve?
-
3
votes6
answers1855
viewsHow to create link with Hover showing strokes on the sides
What I wish to do I want to create a menu and for each link I want to apply an effect "Hover". When the user hovers the mouse will be shown strokes to the sides of the link. Image Example Follows…
-
8
votes6
answers14224
viewsDistribute list of <li> in two columns
I’m trying to create a list with 4 blocks, but they don’t align side-by-side correctly, they’re like this: I wish they’d stay that way: HTML: <li></li> <li></li>…
-
4
votes6
answers30079
viewsHow to insert HTML with Javascript?
What is the simplest way to insert HTML into an element through Javascript?
-
0
votes6
answers1754
viewsHide dives after selecting another category
Select code <select name="category" class="form-control" id="category"> <option value="">Escolha uma categoria</option> <optgroup label="Vehicle"> <option…
-
10
votes6
answers4502
viewsHow to use two CSS attributes at the same time?
The code: <!DOCTYPE html> <html> <body> <h1 style="color:#CC0099">Um dia eu aprendo</h1> <p style="color:red">This is a paragraph.</p> </body>…
-
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…
-
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…
-
5
votes6
answers1100
viewsSame number of characters in password after md5
I’m doing a process of opening a modal and registering a user. User password is modified to md5(); After this the password is with 32 caracteres. When user will load user data to make an update. If…
-
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…
-
0
votes6
answers3210
viewsHow to remove this black border in this presentation by iframe?
I posted a game on my blogger blog, using a post to make a presentation by iframe. Code: <iframe frameborder="0" height="1000"name="ballswar" scrolling="no"…
-
14
votes6
answers29816
viewsHow to create space before or at the end of the text contained between html tags?
I need to put a space before a text that is found between tags html, what is the right way to do ? No css... div{float:left;} <div>Texto 1</div><div> texto que quero um espaço…
-
2
votes6
answers4771
viewsHow to use Materialize side-Nav?
Good morning, I’m trying to make a responsive menu for my portfolio, I’m using the do materialize but when I put it fixed the side-Nav of the mobile version Uga, it gets all dark and not to click on…
-
-1
votes6
answers4426
viewsHow do I make the image 100% on the screen?
I have a website in development. Then I want it to be on the whole screen, it’s to be a responsive site, I’m using the bootstrap... It only gets full screen if I zoom 150%: Example:…
-
5
votes6
answers4895
viewsSuccess message after completing the PHP form
I’m trying to create a simple form for logging a visit at a location. However, I am unable to place a "Data Successfully Sent" message on the same page of this form. The validation of this form,…
-
7
votes6
answers1015
viewsHow could I highlight the radio button that is selected?
I own this radio group which serves to specify the severity level of a given occurrence, using the colors to classify the level. Behold: <html lang="en"> <head> <meta…
-
0
votes6
answers304
viewsAlign images to the center
How do I line up these images at the center? I tried to use the <div class="text-align">, but it didn’t work <code> <section id="team"> <div class = "text-align" <div…