Go Premium for a chance to win a PS4. Enter to Win

x

HTML

58K

Solutions

30K

Contributors

HTML (HyperText Markup Language) is the main markup language for creating web pages and other information to be displayed in a web browser, providing both the structure and content for what is sent from a web server through the use of tags. The current implementation of the HTML specification is HTML5.

Share tech news, updates, or what's on your mind.

Sign up to Post

I am learning html/css and have coded a simple page which has a banner and should be set to a width of 400 pixels and centered horizontally.
However, the width is not set and the "banner" division is displayed full width in the browser.
Where is my code as shown below, incorrect ? I also attach an image of the view in the FireFox browser.

<!DOCTYPE html>
<html>
<head>
	<title>Page Title </title>
	<style>

		#banner{
		width 400px;  margin 0px auto;font-family:Arial, Helvetica, sans-serif;font-size:24px; background-color:#00FF99
		}
		p {
		margin 20px; padding-left 20px;
		}
	</style> 
	 
</head>

<body>
	<div id="banner">
			<p> Frame Status  </p>
	</div>	
</body>
 
</html>

Open in new window

C--Users-roger-Downloads-Screenshots.JPG
0
Industry Leaders: We Want Your Opinion!
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Hello,

Is there a way to remove multiple hyperlinks from a Word document without changing any other formatting?

The attached Word file contains the first chapter of Genesis (KJV) copy/pasted from an .epub file as it is displayed in the File Preview window of Calibre e-book Editor (https://manual.calibre-ebook.com/edit.html).

The pasted text contains multiple hyperlinks, each of which is colored light blue and accompanied by a small superscript footnote marker as shown above the horizontal bar here:

2017-11-21a.png
The superscripts can easily be removed using the Find & Replace box (as shown below the bar), and of course, the font color is easy to change. However, making those changes obviously does not remove the hyperlinks.

Can the Find & Replace box also be used  in some way to remove the hyperlinks? If not, is there another way to do it aside from changing them one-at-a-time?

Thanks

Genesis-CHAPTER-1.docx
0
hello, if i use this code for playing videos on my site:

<video width="320" height="240" autoplay>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>

Open in new window


how can i add an option where by i can choose which video to play? so maybe a drop down list or some sort of file tree which displays all video file names so i can choose which one to watch?

thanks
zac
0
hi all, i'd like to host my own videos online. i have an empty html web page. can someone direct me to some freeware where i can copy and paste some code please?
thanks
zac
0
This is a question regarding HTML rather than C++, I am using Embarcadero XE 10.1 Berlin to produce a web server application.
I am using a TPageProducer  VCL component which has an OnHTMLTag event handler.
The TPageProducer component uses an HTML page Template that I will code, containing one or more  HTML-transparent tags.
The event handler replaces each HTML-transparent tag with HTML code that my application will provide.

My question is, how do I code an HTML-transparent tag in my HTML Template ?

The embarcadero documentation for the event handler is shown below for clarity.



Thanks,

Roger
C--Users-roger-Downloads-Screenshots.JPG
0
I am new at writing Web pages.
I have downloaded Blue Griffon 3 as a tool to make an HTML5 web page.
When I try to save the page (only one page), I get an error saying "please enter a title for the current page ?" as shown below.
I can't see how to do this !!
Any suggestions please ?

Blue Griffon Error
Thanks,

Roger
0
Hello - I've tried a handful of different code samples, but can not figure out how to add a search box to an Angular 2 table.

Here is my app.component.html code

<!--The content below is only a placeholder and can be replaced.-->
<div style="text-align:center">
  <h1>
    Welcome to {{title}}!
  </h1>
  <img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
</div>
<div>
  <input [(ngModel)]="query">
  <div *ngFor="let user of users | search:'id':query">{{user.id}}</div>


<table class="table">
<ng-container *ngFor="let user of users">
      <tr>
        <th>First Name</th><td>{{user.firstName}}</td>
        <th>Last Name</th><td>{{user.lastName}}</td>
      </tr>
      <tr>
        <th>Job</th><td>{{user.job}}</td>
        <th>ID</th><td>{{user.id}}</td>
      </tr>
    </ng-container>
</table>
</div>

Open in new window



and here is my app.component.ts code

import { Component } from '@angular/core';
import { Pipe, PipeTransform } from '@angular/core';


@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  title = 'hello';
  users = [
    {
        "firstName": "Clark",
        "lastName": "Kent",
        "job": "Reporter",
        "id": 20
    },
    {
        "firstName": "Bruce",
        "lastName": "Wayne",
        "job": "Business Owner",
        "id": 30
    },
    {
        "firstName": "Peter",
        "lastName": "Parker",
        "job": "Photographer",
        "id": 40
    },
    {
        "firstName": "Tony",
        "lastName": "Stark",
        "job": "Business Owner",
        "id": 25
    }
]
}

@Pipe({
  name: 'search'
})
export class SearchPipe implements PipeTransform {
  public transform(value, keys: string, term: string) {

    if (!term) return value;
    return (value || []).filter((user) => keys.split(',').some(key => user.hasOwnProperty(key) && new RegExp(term, 'gi').test(user[key])));

  }
}

Open in new window


Where am I going wring. Should the code for the pipe be in a separate file? It did not seem to fix things when I tried...but that's probably because the code is not right.

Any assistance would be greatly appreciated! Thanks!
0
Dear Experts,

which one is more secure to post data for html form?

<form  method="post" >

or

<form  method="post" enctype="multipart/form-data" >

or anything you suggest?

I use PHP and HTML
0
I was doing something with my wordpress site with DIvi builder, and Divi asked that I deactivate my wordpress plugins one by one to see if they were causing a problem.

I deactivated woo-commerce, which is only on one portion of the site, and I get this: This plugin required woocommerce installed.

That's all I see on the home page. Help!  https://techgardens.com/
0
hi,

I'd like the resize this frame depending on the window size, how can i do this?

URL: http://enex.net/autorecon/fusion/bm_network.html

<iframe width="1000" height="600" scrolling="no" frameborder="no" src="https://fusiontables.google.com/embedviz?containerId=googft-gviz-canvas&amp;viz=GVIZ&amp;t=GRAPH&amp;gc=true&amp;gd=true&amp;sdb=1&amp;rmax=100000&amp;q=select+col0%2C+col2+from+1pNOeGhfGxNU9RvFgGMC5egdSprZL-6q50jt9anr5&amp;qrs=+where+col0+%3E%3D+&amp;qre=+and+col0+%3C%3D+&amp;qe=&amp;uiversion=2&amp;state=%7B%22ps%22%3A%221_0_1w_1_t_3a_1_x_-f_u_5_k_d_w_-c_1_m_13_-u_12_-16_b_16_e_-1i_8_2j_s_9_2o_m_4_1n_y_3_1x_-10_2_10_-c_a_2p_-j_6_20_z_q_1d_-q_b_2l_-p_c_1a_s_d_2a_-x_e_2s_-c_f_1t_11_g_27_z_y_3z_-k_i_1q_-x_j_23_-x_k_2t_-3_l_2d_v_n_2f_-s_o_15_-j_p_11_e_r_1j_-w_s_2r_g_u_1g_w_v_y_-4_13_-15_1f_z_46_9_10_3z_n_11_46_-6_1_z_5_14_-p_1p_15_-1b_z_7_2t_8_17_-e_-1x_h_15_m_%22%2C%22cx%22%3A85.96027096386045%2C%22cy%22%3A8.76855179300828%2C%22sw%22%3A639.789842687397%2C%22sh%22%3A245.5175468552088%2C%22z%22%3A0.999142241431289%7D&amp;gco_forceIFrame=true&amp;gco_hasLabelsColumn=true&amp;width=1000&amp;height=600"></iframe>

Open in new window


Thanks
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE
LVL 5
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

On HTML page I want to keep TEXTAREA controls read-only until the user starts typing characters. All other keyboard events should not change the read-only status. In my script, on the first typed character event the handler makes the control not read-only, but that character does not go to the control itself.
I tried to do the following:
$(".textarea").keyup( function(ev) {
    var k = ev.keyCode;
    var inp = ev.target;
    if(  inp.readOnly && k >= 42 && k <= 90 ) {  // an alphanumeric
    	inp.readOnly = false;
        inp.select();  // without this IE do not accept typed in characters at all
        // i tried this:
    	var sev = $.Event("keypress", {keyCode: k, which: k});
        // and that:
    	var sev = $.Event("keypress", ev);
    	$(inp).trigger(sev);
    }
} );

Open in new window

Whatever I tried, the first typed character is lost, the second goes to the control.
0
I have a ASp.Net MVC page. I want to have the text and controls (buttons) move as the screen size changes. Right now I have it all in divs. The first div contains a logo I want to stay aligned on the right. The 2nd div contains text. The 3rd contains 2 buttons. When I change the size of the browser, the text moves as expected, shrinking down or expanding. But the buttons do not move. I'd like them to stay centered under the text. I've tried different styles but I can;t seem to get it. Thanks.

<div style="float; vertical-align: top">
   <image here />
</div>
<div style="vertical-align:top">
  <p style="padding-left:300px; padding-top:50px">
       Test here
</p>
</div>
<div>
     button 1
     button 2
</div>
0
Hi, my LinkedIn Profile badge is misbehaving (see attached image). Almost all of it looks good, but for some reason, the LinkedIn logo is aligning to the left. Going back and forth with LinkedIn's technical support for 1month+ has brought no solutions. Everything they have tried doesn't work.

FYI this is a page hosted on Blogger. I am using a custom theme. I am not an expert, but have not found anything so far that could be a conflict in the theme settings that causes this error.

Help!

LImisalignment.jpg
0
See this code:
$piece1 = $test;
$piece2 = "";
$piece3 = "";
$ln = strlen($test);
if ($ln > 84) {

	$arrayWords = explode(' ', $test);

// Max size of each line
	$maxLineLength = 84;

// Auxiliar counters, foreach will use them
	$currentLength = 0;
	$index = 0;

	foreach ($arrayWords as $word) {
    // +1 because the word will receive back the space in the end that it loses in explode()
		$wordLength = strlen($word) + 1;

		if (($currentLength + $wordLength) <= $maxLineLength) {
			$arrayOutput[$index] .= $word . ' ';

			$currentLength += $wordLength;
		} else {
			$index += 1;

			$currentLength = $wordLength;

			$arrayOutput[$index] = $word . ' ';
		}
	}
	$piece1 = $arrayOutput[0];
	$piece2 = $arrayOutput[1];
	$piece3 = $arrayOutput[2];
}	

Open in new window


This works perfectly, except I need a variation where I can limit the FIRST line ($arrayOutput[0]) to 84 & the subsequent lines to 94. See attached image for visual of this need. The text is printed using a pdf generator on an existing form image (with the word Remarks & the lines.)

How can I do this?

Thank you
Capture.JPG
0
Hello I have a series of text boxes to record telephone numbers.  Like this:
Phone Number: (<asp:TextBox ID="txtContHomePh1" runat="server" MaxLength="3" Width="32px"></asp:TextBox>
                       )
                       <asp:TextBox ID="txtContHomePh2" runat="server" MaxLength="3" Width="31px"></asp:TextBox>
                       &nbsp;-
                       <asp:TextBox ID="txtContHomePh3" runat="server" MaxLength="4" Width="49px"></asp:TextBox>

Open in new window

txtContHomePh1 is the area code, txtContHomePh2 is for the next 3 number, and txtContHomePh3 is for the last 4 digits. I want a RequiredFieldValidator to make sure the user fills out the boxes.  Can I use just 1 for all 3 textboxes? Or do I have to put one on each text box?
0
Hi
I've been struggling to get this to work and have attempted several solutions none work

Workflow:
User clicks a URL which calls a PHP script, this loads into a div below the link
Within the new content is a button which has attributes these need passing into a new function which again loads new content in this Div  

I tried passing 2 variables within the onclick like here  This caused ReferenceError: MyWord is not defined or SyntaxError: missing ) after argument list if using My Word  

I'm now getting
"id {object HTMLButtonElement) Tag undefined

$(function(){
$('a').click(function(e) {
    e.preventDefault();
    $(this).next('.resp').load( $(this).attr('href') );
});

function myFunction(me){
  var ID = me.getAttribute("id");
  var Tag = me.getAttribute("tag");
  
 $(this).closest(".resp").html ("<p>ID " + ID + "Tag" + Tag + "</p>>");

}

  });

Open in new window


HTML

    <div>
      <a id="1" href="myfile.php?param=My Word&ID=1">My Word</a>
      <div id='resp_1' class='resp'></div>
      <a id="2" href="myfile.php?param=MyWord&ID=2">MyWord</a>
      <div id='resp_2' class='resp'></div>
      
    </div>

Open in new window


HTML generated from first load function

<button id="Butt_1" data-tag="My Word"  onclick="myFunction(this)">My Word</button>
<!-- or second URL -->  
<button id="Butt_2" data-tag="MyWord"  onclick="myFunction(this)">MyWord</button>

Open in new window

0
Running the following jsfiddle:
  https://jsfiddle.net/xrnz5tjx/

I set a input checkbox to "true" when clicking on a link, and then programatically trigger the onClick handler for the checkbox field.
In Chrome, all is well but in IE11 the checkbox is reset to false when the onClick handler is executed.

Any ideas on why IE does this?
0
Hi,

I have an html report which shows CDrive usage of a server as red when over 80%, yello when between 70 and 80 and green
when other value.

It works fine except for some occasions, f.e. when 90% it shows green.

Hope example is clear. Please advise howto correct.

J.



#Get C-Drive percentage
		$volC = Get-WmiObject -Class win32_Volume -ComputerName $Computer -Filter "DriveLetter = 'C:'" | Select-Object -Property @{
        Name       = 'C PercentUsed'
        Expression = {
          '{0:N0}' -f  ((($_.Capacity - $_.FreeSpace ) / $_.Capacity)*100)
        }
      }
	  

#Get overviewtable	  
		$Result += [PSCustomObject] @{ 
		CDrive                = $volC.'C PercentUsed'
		...
		
		$CDriveAsPercent = "$($Entry.CDrive)%"
		
#Make the html
		Foreach ($entry in $Result)
		{
				  
		  # check C: Drive Usage
          if((($Entry.CDrive) -ge 80) -or (($Entry.CDrive) -eq 100))
          {
            $ComputerHealthOverviewFragment += "<TD bgcolor=red align=center>$($CDriveAsPercent)</TD>"
          }
          elseif((($Entry.CDrive) -ge 70) -and (($Entry.CDrive) -lt 80))
          {
            $ComputerHealthOverviewFragment += "<TD bgcolor=yello align=center>$($CDriveAsPercent)</TD>"
          }
          else
          {
            $ComputerHealthOverviewFragment += "<TD bgcolor=green align=center>$($CDriveAsPercent)</TD>"
          }
		  ...
		}
		

Open in new window

0
I want to select all paragrahs on the HTML page whose title is "Contact Us".  It seems like
 
[title="Contact Us"] p {color:red; };

Open in new window

should work, but it doesn't .  Does anyone see the problem?

Thanks
0
Free Tool: Port Scanner
LVL 11
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

I'm trying to make a function that walks recursively through the elements bellow:

<body>
    <main class="main">
        <header class="e200-header">
            <a class="umburg side-item" href="#">
                <div>
                    <span class="line line-1"></span>
                    <span class="line line-2"></span>
                    <span class="line line-3"></span>
                </div>
            </a>
        </header>
        <section class="presentation">
        </section>
    </main>
</body>

Open in new window


This is the code that makes it:

function recursiveResolve(node) {
            if (typeof node != 'undefined') {
                //node.someMethod = aFunction

                var l = node.childElementCount

                if (l) {
                    childrens = node.children
    
                    for (var i = 0; i < l; i++) {
                        recursiveResolve(childrens[i])
                    }
                }
            }
        }

recursiveResolve(document.body)

Open in new window


The problem is that, its not working as expected, it is only resolving until the last <span class="line line-3"></span> and stops there when  <section class="presentation"></section> still remaining to be resolved. What i'm doing wrong?
2
access vba
outlook html in access vba

I was told that i do not have the correct opening and closing of "/tables"
but the email looks fine ?

strhtml = "<HTML><Body><table border='1' width='50%'><tr><th>Sku</th><th>PRODUCT_DESCRIPTION</th><th>QTY</th>" & _
"<th>TARGET_PRICE</th><th>COMPETITOR_PRICE</th><th>TARGET_PRICE_PROFITABILITY</th><th>CURRENT_PRICE</th></tr>"




this is for each individual Sku line


If gp >= "25.00" Then
MAILBODY = MAILBODY & "<tr><td>" & rst("SKU") & "</td><td>" & rst("PRODUCT_DESCRIPTION") & "</td><td>" & _
        rst("QTY") & "</td><td>" & Format(rst("TARGET_PRICE"), "Currency") & "</td><td>" & Format(rst("COMPETITOR_PRICE"), "Currency") & _
        "</td><td bgcolor=""Green"">" & "Profitable" & "</td><td>" & Format(rst("CURRENT_PRICE"), "Currency") & "</td></tr>"
       End If

' yellow
If gp >= "20.00" And gp <= "24.99" Then
                MAILBODY = MAILBODY & "<tr><td>" & rst("SKU") & "</td><td>" & rst("PRODUCT_DESCRIPTION") & "</td><td>" & _
        rst("QTY") & "</td><td>" & Format(rst("TARGET_PRICE"), "Currency") & "</td><td>" & Format(rst("COMPETITOR_PRICE"), "Currency") & _
        "</td><td bgcolor=""Yellow"">" & "Low Profitability" & "</td><td>" & Format(rst("CURRENT_PRICE"), "Currency") & "</td></tr>"
       End If




'Red Light
               If gp >= "15.00" And gp <= "19.99" Then
           MAILBODY = MAILBODY & "<tr><td>" & rst("SKU") & "</td><td>" & rst("PRODUCT_DESCRIPTION") & "</td><td>" & _
        rst("QTY") & 

Open in new window

0
I have a piece of code in this fiddle, which simulates an iphone unlock screen, and i would now like to reverse the direction of dragging to unlock such that users drag from right to left to perform the unlock actions.

and this is the fiddle:
https://jsfiddle.net/h6avtu7p/
0
Hello Experts currently our website requires CAC or PKI to get to login screen.  Is there anyway to capture CAC Id's as users login?  Rather than having 1500 users send us their CAC Id's & manually tied to their account?
0
Hello,

I recently added code from this site (https://www.w3schools.com/howto/howto_css_modal_images.asp). Everything works great except the close function. See page: http://doeringdesign.com/ED/#!/page_AP.

Does anyone have any solutions on how to close this popup? Maybe just have it link to the original page?

Thank you!
0
Below codes is on index.html
and how can i carry the id=search value to http://localhost:5489/Quote/BondInfo?

<form role="form"  class="search-form" method="post">
												<div class="form-group">
													<input type="text"  class="form-control" id="search" placeholder="Get our prices. Enter your email">
													<button onclick="fnNext()" class="btn btn-theme" type="button">
														Submit <i class="fa fa-chevron-right"></i>
													</button>
                                                    <script>
                                                        function fnNext() {

                                                            window.location.replace("http://localhost:5489/Quote/BondInfo");
                                                      }
                                                    </script>
                                                    <br />
                                                   <label style="color:white;" >Your Information is safe & secure</label>
												</div>
											</form>

Open in new window

0

HTML

58K

Solutions

30K

Contributors

HTML (HyperText Markup Language) is the main markup language for creating web pages and other information to be displayed in a web browser, providing both the structure and content for what is sent from a web server through the use of tags. The current implementation of the HTML specification is HTML5.