HTML

59K

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

Hello, Experts,

I am building a countdown timer (code below):

let winner = "John Doe";

//creates a function and stores the function inside a variable
var add_minutes = function(dt, minutes) {
    return new Date(dt.getTime() + minutes*60000);
};

var currentTime = new Date();
var futureTime = add_minutes(currentTime,5);

var difference = futureTime.getTime() - currentTime.getTime();

console.log(difference);

var minutes = Math.floor((difference % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((difference % (1000 * 60)) / 1000);

var x = setInterval( function() {

        document.getElementById("clock").innerHTML =  minutes + "m " + seconds + "s ";

        if (difference < 0) {
            clearInterval(x);
            document.getElementById("clock").innerHTML = "Test: " + winner;
    }

    }
    ,1000);

Open in new window


and ref'ing it/attaching to a HTML file (below)

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <p id="clock"></p>
</body>
<script src="test.js"></script>
</html>

Open in new window


And the timer does not count down. Any idea why this might be the case?

output-snapshot.jpg
0
CompTIA Network+
LVL 13
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

Is there a way to embeeded the HTML form into the PHP code below ?

HTML Form
echo "
                  <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" >
                  <input type="text" name="number1" />
                  <input type="text" name="number2" />
                  <br /><br /><br />
                  <input type="submit" name="submit" value="Submit"/>
                  <input type="reset" name="reset" value="Clear" />
                  </form>
            ";


<!DOCTYPE HTML>  
<html>
<head>
</head>

<body>  

<?php
      //$filePath = $_SERVER['PHP_SELF'];       // find URL of current file without the hostname
      extract($_POST);                                       //array to variable conversion, $_POST("number1") => $number1
            
      if (isset($number1) && isset($number2)) {
            // perform type casting to variables
            $number1 = (int) $number1;  
            $number2 = (int) $number2;  
            $sum = $number1 + $number2;
            if ($number1 > $number2)
                  print("number1 is greater than number2 <br />");
            else if ($number1 < $number2)
                  print("number1 is less than number2 <br />");
            else
                  print("number1 is equal to number2 <br />");

            print("The sum of the 2 numbers is $sum<br />");
      } else {
            //show the html form
            
      }
?>
</body>
</html>
0
I find that a blank line (<br/> )doesn't insert as execpted. Any idea ?

<form id="form1" action= "http://localhost/list.php" method="POST">

<label for="tfPrice">Search Price</label>
<input type="text" name="tfPrice" id="tfPrice" />
<br />
<input type="submit" value="Search" />
<input name="Reset" type="reset" value="Clear Form">
</form>
0
What's it called when you have you have a background picture with a transparant color with text on top? Similar to the top of this site? https://charlottediscountproperties.com/charlotte-off-market-deals
0
Problem with flexbox or html code.

I am creating a webpage for the first time. My question is about using flexbox and css. I do not know how to use this and every example that I follow fails.

This is what I have so far:

my html:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Flexbox</title>
    <link rel="stylesheet" href="style.css">
</head>

<body>
    <header class="flex-header">
        HEADER
    </header>
    <main class="flex-main">
        <nav class="flex-nav">
            SIDENAV
        </nav>
        <article class="flex-article">
            MAIN CONTENT
        </article>
        <aside class="flex-aside">
            SIDEBAR
        </aside>

    </main>
  <footer class="flex-footer">
    FOOTER
</footer> 
                   
</body>
</html>

Open in new window


my css file:

* {
    margin: 2px; 
}
body {
    font-size: 24px;
    color: white;
    height: 100vh;
    text-align: center;
}
.flex-header {
    background-color: #5070B5;
    padding-top: 3rem;
    padding-bottom: 3rem;   
}
.flex-main {

}
.flex-nav {
    background-color: #B95F21;
    padding-top: 3rem;
}
.flex-article {
    background-color: #81A43C;
    padding-top: 3rem;
}
.flex-aside {
    background-color: #B95F21;
    padding-top: 3rem;
}
.flex-footer {
    background-color: #5070B5;
    padding-top: 3rem;
    scroll-padding-bottom: 3rem;
}

Open in new window

0
I have a couple of PHP modules that include JS and jQuery logic.  One is chat.php and the other is fetch_user.php.  chat.php does a jQuery ajax call to fetch-user.php  and fetch_user.php returns an HTML table to chat.php which is then inserted into chat.php's DOM.  All this works perfectly.

In the data returned from fetch_user.php there is an HTML button which has some attribute data which the ajax  'success' function has access to and I can extract this data OK.

My issue is that I have a JS array which as far as I am aware has global JS access.  I want to first empty the existing data in that array (which is named logged_in_array) and the add the extracted attribute data to that array.  In my code the logged_in_array.length = 0 does not empty the array, nor does the logged_in_array.push work.

So my specific issues are that the array is not being emptied nor is the attribute datum being added to the array.

I will attach extracts of the code:

demo-code.html
0
Syntax error in console:
jquery-2.2.4.min.js?ver=null:2 Uncaught Error: Syntax error, unrecognized expression: http://downtowndurham.com/psp/

<html>
<ul class="select">
<li class="active"><a class="anchorLink" href="#myoverview" rel="" name="introduction">Overview</a></li>
<li><a href="#my2019projects">Projects</a></li>
<li><a href="#my2019selectionaacommittee">Selection Committee</a></li>
<li><a href="#myapply">Apply</a></li>
<li><a href="#mysponsorship">Sponsorship</a></li>
<li><a href="#mysignup">Sign-up</a></li>
<li><a href="http://downtowndurham.com/psp/">Public Space Project</a></li>
</ul>

Open in new window

0
How can I convert a website I am currently on to a PDF file.. Showing all website content?  I want it to show header and footer information as well.
0
I'm trying to center a card both horizontally and vertically with a sticky footer, every-time I get the card centered the sticky footer content covers the card.

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Bootstrap</title>

<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">

<!-- Custom styles -->
<style type="text/css" media="all">
/* Sticky footer styles
-------------------------------------------------- */
html {
	position: relative;
	min-height: 100%;
	height: 100%;
}
body {
	/* Margin bottom by footer height */
	margin-bottom: 60px;
	height: 100%;
}
.footer {
	position: absolute;
	bottom: 0;
	width: 100%;
	/* Set the fixed height of the footer here */
	height: 60px;
	line-height: 60px; /* Vertically center the text there */
	color: #999;
	padding-left: 65px;
}

/* CSS only for examples not required for centering */
.container {
    height: 100%;
}
	.container-fluid {
    height: 100%;
}
</style>
</head>

<body>
<!-- Begin page content -->
<div class="container">
<div class="row h-100">
        <div class="col-sm-12 my-auto">
			<div class="card card-block mx-auto" style="width: 520px;">
      <div class="card-body">
        <h5 class="card-title">Card title</h5>
        <p class="card-text">Some quick example text to build on the card title and make up 

Open in new window

0
How would I go about hiding only the word "by" in the following block of HTML using CSS ?

<p class="author-info">

	<span> 
	
		by <span class="blue">Joe Schmoe</span> 
		
	</span>

</p>

Open in new window


I've tried the following, .. but I can't seem to get it to work:

p.author-info span { display:none; }
p.author-info span span.blue { display:block!important; }

Open in new window


What's the trick?  Is this even possible?  

Thanks,
- Yvan

p.s. Note that this is dynamically generated code within a commercial WordPress theme, .. so modifying the HTML code directly isn't really an option .. at least not without creating problems.  That's why I'm trying to use a simpler CSS based approach.
0
Should you be charging more for IT Services?
Should you be charging more for IT Services?

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

I ask the following question again. Previous one does not answer everything

If I have just a simple web form in html and  a submit button., and I want to create json file basically,
when the button is clicked, capture, each id inside of the form in a loop. (My web form will be huge so I do not want to capture one by one).
then create json format, and  drop into root directory like www.hello.com\json\abc.json.

Is it possible?

In my web form I only use type=text and <select></select> and the id name will be header name  inside of json. Just keep it simple. and I do not use <form></form> just <a onclick=submitnow()>

Thanks,

<div class="col-md-6">
    <div class="form-group bd-t-0-force">
        <label class="form-control-label"><i class="fa fa-credit-card"></i> Card Number: <span class="tx-danger">*</span></label>
        <input class="form-control" type="text" name="ccnumber" value="Market St., San Francisco" placeholder="Enter Card No.">
    </div>
</div><!-- col-8 -->
<div class="col-md-2">
    <div class="form-group mg-md-l--1 bd-t-0-force">
        <label class="form-control-label"><i class="fa fa-credit-card"></i> Card Expiration Month: <span class="tx-danger">*</span></label>
        <input class="form-control" type="text" name="ccexpdatemm" value="" placeholder="Enter Card Expiration Date Month">
    </div>
</div><!-- col-4 -->
<div class="col-md-2">
    <div class="form-group mg-md-l--1 bd-t-0-force">
        <label class="form-control-label"><i 

Open in new window

0
If I have just a simple web form in html and  a submit button., and I want to create json file basically,
when the button is clicked, capture, each id inside of the form in a loop. (My web form will be huge so I do not want to capture one by one).
then create json format, and  drop into root directory like www.hello.com\json\abc.json.

Is it possible?

In my web form I only use type=text and <select></select> and the id name will be header name  inside of json. Just keep it simple. and I do not use <form></form> just <a onclick=submitnow()>

Thanks,

<div class="col-md-6">
    <div class="form-group bd-t-0-force">
        <label class="form-control-label"><i class="fa fa-credit-card"></i> Card Number: <span class="tx-danger">*</span></label>
        <input class="form-control" type="text" name="ccnumber" value="Market St., San Francisco" placeholder="Enter Card No.">
    </div>
</div><!-- col-8 -->
<div class="col-md-2">
    <div class="form-group mg-md-l--1 bd-t-0-force">
        <label class="form-control-label"><i class="fa fa-credit-card"></i> Card Expiration Month: <span class="tx-danger">*</span></label>
        <input class="form-control" type="text" name="ccexpdatemm" value="" placeholder="Enter Card Expiration Date Month">
    </div>
</div><!-- col-4 -->
<div class="col-md-2">
    <div class="form-group mg-md-l--1 bd-t-0-force">
        <label class="form-control-label"><i class="fa fa-credit-card"></i> Card Expiration Year: <span 

Open in new window

0
Hi

      I am trying to build an html button for an email where the button is wrapped in a table cell using the following code. It isn't working properly as shown in the attached image

      Dim oLinkAccept As String = "http://SteelYard.azurewebsites.net/offers_to_me?oOfferID=" & oNewOfferID & "&oOfferAcceptDecline=Accept"

            oHBody = oHBody & TableCellWrapper("<a href=" & oLinkAccept & " style='padding: 8px 12px; border: 1px solid #006400;border-radius: 2px;font-family: Helvetica, Arial, sans - serif;font-size:   14px; color: #006400;text-decoration: none;font-weight:bold;display: inline-block;' >ACCEPT</a>")

    Function TableCellWrapper(ByVal X As String) As String

        Dim S As String

        S = "<table width = '100%' cellspacing='0' cellpadding='0'>"
        S &= S & "<tr>"
        S &= S & "<td>"
        S &= S & "<table cellspacing = '0' cellpadding='0'>"
        S &= S & "<tr>"
        S &= S & "<td style = 'border-radius: 2px;' bgcolor='#ED2939'>"
        '<a  Class=”link” href="https://www.copernica.com" target="_blank">
        'Click            
        '</a>
        S &= S & X
        S &= S & "</td>"
        S &= S & "</tr>"
        S &= S & "</table>"
        S &= S & "</td>"
        S &= S & "</tr>"
        S &= S & "</table>"



        TableCellWrapper = S

    End Function

Image1.jpg
0
Hi

I am building the following clickable button link and it looks good and works well in most emailing systems except gmail where it just appears as a normal hyperlink with no border. Why would that be?


            Dim oLinkAccept As String = "http://SteelYard.azurewebsites.net/offers_by_me?oOfferID=" & oOfferID & "&oCounterofferAcceptDecline=Accept"

            oHBody = oHBody & "<a href=" & oLinkAccept & " style='padding: 8px 12px; border: 1px solid #006400;border-radius: 2px;font-family: Helvetica, Arial, sans - serif;font-size:   14px; color: #006400;text-decoration: none;font-weight:bold;display: inline-block;' >ACCEPT</a>"
0
FullCalendar (fullcalendar.io) using agendaWeek does not allow me to drag events into the range of 00:00am to 11:59am. When dragging the event into the zone as shown on the image, it disappears or reduces itself.

FullCalendar Agenda Gridload_calendar.js
0
http://146.66.113.175/~techgard/ix-storage/ What is the simplest way to make the bullets a black disc instead of these checkmarks? I see that it seems to be using an icon. Thanks!
0
If you take this page: https://www.magickitchen.com/test-bounce.html and test it on Google's mobile tester: https://search.google.com/test/mobile-friendly?url=https%3A%2F%2Fwww.magickitchen.com%2Ftest-bounce.html  You will see that the page isn't mobile friendly.

With the help of some experts here, I was able to narrow that down. By removing the classes  animated bounceInDown  from the orange circles under How it Works, the page becomes mobile friendly again.

Is it possibly just this css on bounceInDown? transform: translateX(400px);

I hope that is enough information, thanks.
0
I received an email from a sender supposedly "abc@domain.com". However, I suspect that's not the real sender.  How can I determine the real sender  by looking at the message source? (That HTML filled page).
0
Hi Experts,

When you go to https://www.aces-project.com/ you will get a SSL Mixed Content warning for the ".../2018/05/IWSC-certified-....jpg" image, but under the source I search and cannot find any image references to "http://"

Can any one spot what's going on?

Thanks.
0
Become a Microsoft Certified Solutions Expert
LVL 13
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

https://search.google.com/test/mobile-friendly?id=vrughLHv7-LfXilg5Zu_Ng  that test says the page isn't mobile friendly, and the screenshot shows this:


Capture.JPG
But I can't replicate that in Chrome. It looks fine in Chrome. How can I test and fix this issue? Thanks.
0
There are a lot of articles out there on my issue, but I need to ask a few questions to feel comfortable with this upgrade.  I'm trying to upgrade the switch using the tar file, but I get the "not enough space on device" error during the file copy.  I've read that you can run the erase flash: command, but I'm a little iffy on that as I don't want to lose my vlan.dat file or my license files.  I have copied all three off to my TFTP server, but I'm still trigger shy.  What is the best way for me to clear space up on the switch without causing myself grief?  Likewise, where is the HTML directory hidden?  I can't see it when I run a directory listing of the flash?  I thought that deleting it would help clean up some space and the copy would put it back, but I can't find it.

Thanks in advance.
0
https://search.google.com/test/mobile-friendly?id=vrughLHv7-LfXilg5Zu_Ng  Hi, the site has been mobile friendly for some years now, I see their screenshot shows the site sort of off to the side, but I don't see that in Chrome inspector.

Can anyone help me with that? thanks
0
Hi EE,

I have a SQL script to email in HTML format:

declare @emailSubject varchar(100),
       @textTitle varchar(100),
       @tableHTML nvarchar(max),
          @mailrecipients varchar(100),
          @mailrecipients2 varchar(100)

select @emailSubject = 'Procura Duplicates',
       @textTitle = 'All Duplicate Employee in Procura'

set @tableHTML = '<html><head><style>' +
   'td {border: solid black 1px;padding-left:5px;padding-right:5px;padding-top:1px;padding-bottom:1px;font-size:11pt;} ' +
   '</style></head><body>' +
   '<div style="margin-top:20px; margin-left:5px; margin-bottom:15px; font-weight:bold; font-size:1.3em; font-family:calibri;">' +
   @textTitle + '</div>' +
   '<div style="margin-left:50px; font-family:Calibri;"><table cellpadding=0 cellspacing=0 border=0>' +
   '<tr bgcolor=#4b6c9e>' +
   '<td align=center><font face="calibri" color=White><b>PRoEmployeeID</b></font></td>' +    -- Manually type headers
   '<td align=center><font face="calibri" color=White><b>LastName</font></td>' +     -- Manually type headers
   '<td align=center><font face="calibri" color=White><b>FirstName</b></font></td></tr>' + 
   '<td align=center><font face="calibri" color=White><b>Gender</b></font></td></tr>' + 
   '<td align=center><font face="calibri" color=White><b>PGEmployeeCode</b></font></td></tr>' +
   '<td align=center><font face="calibri" color=White><b>ChangeDate</b></font></td></tr>' 
      -- Manually type headers
         



IF 

Open in new window

0
I am using simple HTML to open new tab

<a  href="http://www.somesite.com/Test.pdf"  target="_blank" >

It opens fine in new tab. How can i change title of new tab. Any ideas please?
0
Hi,

I d like to pimp my powershell generated html report. I d hope somebody could suggest some changes to my css so it looks more professional (not a designer, more a script er myself).

Thanks!
Below the  css
$HTMLHeader += @"
    <BODY>
<style type="text/css">
    <!--
    body {
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    font: 10pt Verdana, Geneva, Arial, Helvetica, sans-serif;
    }

    #report { width: 835px; }

    table{

    border-collapse: collapse;
    border: 1px solid #FFFFFF;

    font: 10pt Verdana, Geneva, Arial, Helvetica, sans-serif;
    color: black;
    margin-bottom: 10px;
    }

    table td{
    border-collapse: collapse;
    border: 1px solid #FFFFFF;
    font-size: 14px;
    padding-left: 10px;
    padding-right: 10px;

    }

    table th {
    border-collapse: collapse;
    border: 2px solid ##FFFFFF;
   
    font-size: 14px;
    font-weight: bold;
    padding-left: 10px;
    padding-right: 10px;

    }

    h2{ clear: both; font-size: 130%; color: black; }

    h3{
    clear: both;
    font-size: 115%;
    margin-left: 20px;
    margin-top: 30px;
    color: brown;
    }

    h4{
    clear: both;
    font-size: 90%;
    margin-left: 20px;
    margin-top: 30px;
    }

    }
   
    button.accordion {
    background-color: #eee;
    color: #444;
    cursor: pointer;
    padding: 18px;
    width: 25%;
    border: none;
    text-align: center;
    …
0

HTML

59K

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.