Most viewed "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
-
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…
-
10
votes2
answers146605
viewsHow to get input using HTML and Javascript
As a beginner in the language 'JS', I would like to know how to simply pick up text from a <form> (without forwarding to another page and without changing the URL) and passing to a function…
-
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…
-
13
votes2
answers127257
viewsPut a background image and make it responsive
I’m having a problem putting a background image on my page. I did some tests and it looks like this when I change the window size: When I maximize it’s right: How can I adjust this image to get the…
-
2
votes3
answers122074
viewsPlace text next to image
I’m trying to put an image and a text on the side, but I’m not getting it. The text is under the photo or I can put the first sentence of the text on the same level as the top of the image on the…
-
8
votes1
answer107590
viewsHow to insert favicon into an HTML?
I’m starting to play in HTML and would like to know how to implement a favicon.
htmlasked 10 years, 2 months ago João Pedro -
15
votes1
answer105429
viewsInsert line break (enter) using HTML codes
I’m trying to enter/break a line (\n, <br />, etc) in a title an html element. To do so, I searched for HTML Codes something that was equivalent to   used to give a "space". I found…
htmlasked 10 years, 5 months ago CesarMiguel 4,800 -
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?…
-
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(){…
-
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…
-
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).…
-
82
votes5
answers86551
viewsUpload a file with AJAX
I wonder if there is any simple way to upload files via AJAX + JSON. If there is, what would it be?
-
3
votes3
answers81788
viewsOpen link in new tab without using target="_Blank" embedded in HTML
Setting I am optimizing a page where is displayed about 200 Images (very small does not need paging) partners, these images are wrapped in a tag <a> and all partner websites open in new tab…
-
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…
-
3
votes3
answers75169
viewsCentralize Divs - Bootstrap
Well, I divided the content part into two Ivs, col-Md-6, only they’re not centered in relation to the site, even though they’re in the center, they’re on the left side, leaving the right side a…
-
4
votes1
answer74733
viewsProblems with: Uncaught Referenceerror: $ is not defined
There is a doubt in this forum here, but it doesn’t solve my problem. I have includes, including include jquery in the first line because link found this: Because, JS interpreter search for $ before…
-
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…
-
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…
-
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
votes3
answers63205
viewsImage with 100% width
I have the following CSS statements applied to an element: .minhaClass { float:left; width:100%; height:560px; background:url(../imagens/corpo/imagen.jpg) repeat-x top center; } This will happen on…
-
10
votes5
answers62952
viewsHow to remove edge of input and textarea from all browsers when clicked?
Just look at the image to get an idea: When clicked this edge with blue shadow becomes visible. I think it is standard of all browser. Some solution?…
-
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…
-
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?…
-
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…
-
3
votes3
answers60168
viewsHorizontal line in the middle of an unordered HTML list
I have an unordered list that has some list items and would like to place a horizontal line (horizontal Rule < hr >) on it, right in the middle, with height of 2px. I tried to put…
-
3
votes5
answers59481
viewsTake content from within a Div and put in Input value
I have a form, and inside it I have an input, which will have to take what it contains inside a DIV, which in case is only text. The input is like this: <input class='formContato' type='text'…
-
-1
votes2
answers58434
viewsBackground image, using css
How do I put a background image on div, using css? I tried using simple quotes but nothing happened: background: url('images/html.jpg'); I’m doing so in the: #tudo { width: 100%; height: 992px;…
-
1
votes4
answers57975
viewsHow to clear html form fields?
javascript variables that reference each field of my form var checkbox = $('input:checkbox[name^=check]:checked'); var categoriaVeiculo = $("#codCategoriaVeiculo").val(); var descricaoVeiculo =…
-
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'…
-
117
votes3
answers57155
viewsCharset iso-8859-1 and utf-8 compatibilization problems
The 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…
-
7
votes2
answers56156
viewsHow to center all content of a div - Bootstrap
Hello. I am learning how to use the bootstrap. In my studies I had a question. If there’s any way to centralize the entire contents of a div. I have sample codes... <!DOCTYPE html>…
-
2
votes3
answers55998
viewsRun php function with onclick
I want to know how I can run a php function with the onclick event on an element a, taking as an example: <a href="">Teste onclick</a> And the function: function testeOnclick() { echo…
-
5
votes2
answers55591
viewsLimit html input
I want to put an input in html and I want to limit only to 2 numbers. <input type="text" name="Dia" maxlength="2" size="2" > I tried this but still letters appear.…
-
9
votes2
answers55209
viewsSet OPTION as SELECTED based on database values
I am preparing a form where I am setting the values of the fields with the database data. I’m having trouble setting the chosen option as selected to the <select/> in the code below: PHP…
-
3
votes3
answers55067
viewsScript to go back to the previous updated page?
Well, I wanted something that did that when a person clicked to go to a page they were redirected to the previous page.. But the page updates... Is that I made a small system of comments, when I…
-
4
votes2
answers54475
viewsPlace Javascript function inside onclick
So it’s kind of a silly question, but I really need... has how I put a Javascript function inside a buttom in this example below it calls the function loadDoc(). more I would like to put the…
-
2
votes2
answers52643
viewsHow to make a background image fill the entire screen without losing image resolution
I have a part on my site where I need to put a background image occupying the entire screen, both wide and high. I managed to do this with css. .intro { display: table; width: 100%; height: 100%;…
-
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…
-
9
votes1
answer51550
viewsScroll in div if necessary
I have the following div on my page html <div id="divContent" class='content'> Bem vindo ao meu site <br /> 1 index index index index index index index index <br /> 2 index index…
-
2
votes2
answers48943
viewsHow to change the color of a single link?
How to change the color of a single link? I’ve tried to go on "Modify - Page properties - Links", however the settings that are put there go to ALL links, and is not what I want on my site.…
-
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…
-
8
votes5
answers48166
viewsHow to increase or decrease the div proportional to 720x540?
I’m trying to solve this question because I have a slide on. ppt with dimensions of 720w and 540h and my page is net, so the reason for increasing or decreasing proportionally. Example:…
-
5
votes5
answers47771
viewsCentralize a table (HTML)
I made a table in mine HTML, but I couldn’t center it in the middle of the screen. She’s vertical and I’ve tried putting the text-align:center but it didn’t help. td, th { padding: .7em; margin: 0;…
-
8
votes4
answers47612
viewsPin the footer of an html page and follow the page content
I need to pin the tag footer at the end of the html page, but when the content exceeds the page by tag footer should follow the content and not be fixed. See the CSS code is the HTML code I’m using…
-
2
votes3
answers46606
viewsMask for HTML5 Input fields
I am applying a mask addition feature in my code, even when the user fills the phone or mobile, to chew be filled automatically. However, my page does not return anything while user type.…
-
4
votes3
answers46491
viewsPath to access html folders ,css,php etc
Could someone explain me this Nives system to access folder in the use of languages like html,css and php (../)(.../)(./).?
-
-2
votes2
answers46299
viewsHow can I take the value of a text and print on the screen
I am trying to print a value that was typed by user from a textfield, for example a name field. But after I get it, I want to print that name.
-
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…
-
8
votes3
answers44043
viewsHow to put icon inside input using Font Awesome?
I’m trying to make a search field with an icon using Font Awesome, I want it to look like this: but he gets like this: What is the best way to put the button within the input? HTML: <form>…