how do you code an image in html
<!DOCTYPE html>
<html>
<head>
<title>HTML img Tag</title>
</head>
<body>
<img src="/html/images/test.png" alt="Simply Easy Learning" width="200"
height="80">
</body>
</html>
how do you code an image in html
<!DOCTYPE html>
<html>
<head>
<title>HTML img Tag</title>
</head>
<body>
<img src="/html/images/test.png" alt="Simply Easy Learning" width="200"
height="80">
</body>
</html>
converting HTML table to image
<html>
<head>
</head>
<body>
<table id="myTable" class="table table-bordered table-striped table-fixed">
<thead>
<th>Key Account</th>
<th>Key Account Code</th>
<th>Potential Value</th>
<th>Sales Value</th>
<th>Penetration %</th>
<th>Potential (H/M/L)</th>
<th>Penetration (H/M/L)</th>
</thead>
<?php echo "Some data from database here";?>
</table>
<button id="convert">
Convert to image
</button>
<div id="result">
<!-- Result will appear be here -->
</div>
<script type="text/javascript" src="https://github.com/niklasvh/html2canvas/releases/download/0.5.0-alpha1/html2canvas.js"></script>
<script>
//convert table to image
function convertToImage() {
var resultDiv = document.getElementById("result");
html2canvas(document.getElementById("myTable"), {
onrendered: function(canvas) {
var img = canvas.toDataURL("image/png");
result.innerHTML = '<a download="test.jpeg" href="'+img+'">test</a>';
}
});
}
//click event
var convertBtn = document.getElementById("convert");
convertBtn.addEventListener('click', convertToImage);
</script>
</body>
</html>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us