(Notepad++) HTML Preview not available - html

I'm working on a project for class and I need to use HTML preview to see my work so far. Whenever I try it, I get a blank window saying preview not available.
<!DOCTYPE html>
<html>
<head>
<title>Identity Theft</title>
</head>
<body style=background-color:lightsteelblue>
<h1 style=text-align:center;color:blue> Protecting against identity theft</h1>
<hr style=background-color:white size=5px>
<div style="font-family;Arial">
<h2> Keping Your Personal Information Secure Online</h2>
<ol><li> Be aklert to impersonators</li></ol>
<li> Safely dispose of personal information</li>
<li>encrypt your data</li>
<li> Keep passwords private</li>
<li> Don't overshare on social networking sites</li>
<h2> Keeping your devices secure</h2>
<ul><li> Use Security Software</li>
<li>lock up your laptop</li>
<li>Be Wise about wi-fi</li>
<li> Avoid phishing emails</li>
<li> Read privacy policies</li></ul>
</div>
<p>Source: Federal Trade Commission</p>
<div align ="center">
<h3> Report Crimes or Suspicious Activity</h3>
<table border ="2">
<tr>
<th>Activity</th>
<th>Contact</th>
</tr>
<tr>
<td>Identity Theft</td>
<td> The Federal Trade Commission </td>
</tr>
<tr>
<td> Internet Crime </td>
</body>
</html>

View your HTML file rendered dynamically as you type.
From Plugins > Plugin Manager, install plugin Preview HTML.
Focus your HTML File.
Select Plugins > Preview HTML > Preview HTML.
The window now should show HTML file (if not, test it on a simple sample). Keep the window floating or dock it, e.g. to the bottom of the Notepad++ window.
Type at least one character into your HTML code to see the preview.

Related

html button is not loading document.location on click

I have a problem, when i click run in visiual studio and then i click the button
" [ https://www.coursera.org/learn/duke-programming-web][1] Programming Foundations with JavaScript, HTML and CSS
will the corsera website open. But when i make this in codepen.io for coding,that i click the button, then the website can not open.
Why happend that? `
if i click on the button of visiual studio then the corsera website will open, but if i do that from the website for coding, then corsera will reject it, so the website won't open?
<html>
<head>
<meta charset="UTF-8">
<title>Curriculum Vitae</title>
</head>
<body>
<em><h1><b><p>Curriculum Vitae:</p></b></h1></em>
<br>
<div>
<h3>Photo:</h3>
<img src="https://miro.medium.com/max/1400/1*l2AFc33U7grIeMML0a0unQ.jpeg" width="200px" height="150px">
</div>
<div>
<h3><p>Contact details:</p></h3>
<ul>
<li><h4>Name: &nbsp Alex Alex </h4></li>
<li><h4>Email: &nbsp example#gmail.com</h4></li>
<li><h4>Mobile number: &nbsp 005910280000</h4></li>
</ul>
<hr>
<b><h3>Education:</h3></b>
<ol start="10">
<li><h4> 2011-2014 &nbsp University education</li>
<li><h4> 2008-2011 &nbsp high school </h4></li>
<li><h4> 2005-2008 &nbsp Secondary education</h4></li>
<li><h4> 2000-2005 &nbsp the basic education</h4></li>
</ol>
<hr>
</div>
<div>
<em>Notes:</em>
<div>
<p>For more cv you should to visit this cv-website </p>
</div>
<div>
for more hacks photos cklic the photo
<a href="https://www.shutterstock.com/search/website%2Bhack" target="_Parent">
<img src="https://image.shutterstock.com/image-photo/computer-hacker-cyber-attack-concept-600w-553688845.jpg" alt="Hack Photo" width="25" height="25">
</a>
</div>
</div>
<h2>Button as link</h2>
<p> click the button to see corsera website</p>
<button onclick=" document.location='https://www.coursera.org/learn/duke-programming-web'"> Programming Foundations with JavaScript, HTML and CSS</button>
</body>
</html>
CodePen will render your HTML page within an iFrame.
Some sites will try to block that.
Other links to other sites will work.
Try like a Wikipedia link, for example:
<button onclick="document.location='https://en.wikipedia.org/wiki/Intentionally_blank_page'"> Programming Foundations
with JavaScript, HTML and CSS</button>
It's not your code issue, it's because of codepen. Happy coding!
To elaborate on #foreza's response, the link is working but the site is blocked because of Cross-Origin request sharing (CORS) which you can read about here
In codepen, you're trying to request a site from a different origin and that site blocks cross origin requests.
A site that doesn't block cross origin requests, like wikipedia, will work
or
A site with the same origin (codepen in this case) will also work.
In a codepen:
<button onclick="javascript:document.location='https://codepen.io/gpspake/pen/NWGevvj'"> Programming Foundations with JavaScript, HTML and CSS</button>
Example: https://codepen.io/gpspake/pen/NWGevvj
In codepen, right click and click inspect to open your browser's developer tools, then click on the network tab to see the requests that are being sent when you click the button.

Display information not in a table

I have a page that just has a title, header and 3 links.
Is it possible to have them next to each other with a small space in between? I have tried tables but it doesn't create a space, they are too close together. Or if anyone knows a better way to display them please let me know. I just require them to be next to each other.
Eg. Out Of Office--------Leave Application---------Extension List
Just a lot neater and better to look at.
My code:
body {
background-image: url("burg.jpg ");
}
<CENTER>
<h1> Alpine Motors Local Services </h1>
<HR>
<table border="0">
<td>
<h2>*Set Out Of Office*</h2 </td>
<td>
<h2><a href='leaveform/LeaveForm.php'>Leave Application*</a></h2 </td>
<td>
<h2><a href='VW Ext List/index.php'>Extension List Directory*</a>
</h2>
</td>
</table>
<HR>
</center>
Out Of Office    Leave Application    Extension List
This is the easiest way to achieve this with only html, but there are much better ways. Anyways, the output will be as follows
Out Of Office    Leave Application    Extension List
if you want more space between them, simply add more $emsp; between words

HTML, How do I left justify a picture even though im using CID?

I am trying to create an interface for emails. I want to import a picture but I can't do it without having cid. For example:
That works just fine. but i Can't seem to put the text to the left of the picture. Please look at the code below to get a better understanding!
<div style="background-color:black;">
<body style="font-color:white;">
<h1><i>Airline Credits</i></h1>
</br>
</ul>
Dear [FullName],<br/>
Thank you for your <i>Airline Credits</i> redemption. Below is a summary of your order:
<b>Order Date:</b>[OrderDate]<br/>
<b>Description:</b>[ItemName]
<br/><b>Redemption Amount:</b>[CostInPoints]
<br/><b>Order Tracking Number:</b>[OrderNumber]
<br/><br/>
<b>Please note:</b>
If you did not make this request, please contact us immediately at [AirlinePhoneNumber]. Our Customer Service Representatives are available to help you.
<br/><br/>
Please read the terms and conditions for Airline Credits Redemptions at [WebSiteAddress] about how you are provided your redeemed items. To view your Airline Credits balance, please click here
<br/>
<img src=cid:AirlineCredits.jpg/>
</body>
</div>
HTML email is pain - nothing inherent in it, but because Microsoft decided to make Outlook 2007, 2010, and 2013 use Word's horribly broken and poor HTML rendering implementation (whereas Outlook 2003 used IE's).
Outlook has poor floating box support, so I advise against it in this situation.
Anyway, ordinarily I'm a web-standards zealot - but in HTML email that doesn't really seem to matter, so I'd just say to use tables, like so:
<table border="0"> <!-- Tim Berners-Lee, forgive me, for I have sinned. -->
<tr>
<td>
<p>Please read the terms and conditions for Airline Credits Redemptions at [WebSiteAddress] about how you are provided your redeemed items. To view your Airline Credits balance, please click here</p>
</td>
<td> <img src=cid:AirlineCredits.jpg /> </td>
</tr>
</table>
Relatively painless, gets the job done.
(and causes me to die inside).

a href link doesn't work in gmail [duplicate]

I would like to put a table of contents at the top of an internal email newsletter that will allow readers to 'jump' down to the part of the newsletter that interests them. Something like:
<ul>
<li>Funding Opportunities</li>
<li>Professional Development</li>
<li>Best Practices</li>
</ul>
Then 'further down' in the email newsletter have:
<h2><a id="FUNDING">Funding</a></h2>
<!--- news items about funding -->
<h2><a id="DEVELOPMENT">Professional Development</a></h2>
<!--- news items about professional development -->
<h2><a id="BEST">Best Practices</a></h2>
<!--- news items about Best Practices -->
This works fine in browser based HTML, but I have not had success getting it to work in various email clients (gmail, groupwise, outlook). I have however, received emails that appear to use a technique like above and I am able to 'scroll' the email. I understand that support in various clients will vary and that this is not necessarily a 'good' practice but this is an internal system and almost all recipients will be using GroupWise.
Any experienced insight into the specific additional markup that is needed (e.g. what would the base ref be?) would be greatly appreciated.
Try adding the 'name' attribute to the anchor as well as the 'id'.
<a id="FUNDING" name="FUNDING">
I found this post when trying to accomplish the same thing, and I followed instructions here to get it to work: http://blog.mailermailer.com/tips-resources/anchor-tags-html-emails
This is the code I ended up with in the first successful test:
<html>
<a name="BACKTOTOP">Index</a>
<ul>
<li>Compliance Courses</li>
<li>Dealer Training</li>
<li>Functional Training Courses</li>
<br>
<h1>
<a name="COMPLIANCE">Compliance</a>
</h1>
<br>
This will be the message for Compliance courses.
<br>
Return to top index
<br>
<h1>
<a name="DEALERTRAINING">Dealer Training</a>
</h1>
<br>
This will be the message for Dealer Training.
<br>
Return to top index
<br>
<h1>
<a name="FUNCTIONALAREA">Functional Training Courses</a>
</h1>
<br>
This will be the message for courses by Functional Area.
<br>
Return to top index
</html>

How to use HTML anchors as a table of contents in email when rendered in clients like Groupwise or Gmail?

I would like to put a table of contents at the top of an internal email newsletter that will allow readers to 'jump' down to the part of the newsletter that interests them. Something like:
<ul>
<li>Funding Opportunities</li>
<li>Professional Development</li>
<li>Best Practices</li>
</ul>
Then 'further down' in the email newsletter have:
<h2><a id="FUNDING">Funding</a></h2>
<!--- news items about funding -->
<h2><a id="DEVELOPMENT">Professional Development</a></h2>
<!--- news items about professional development -->
<h2><a id="BEST">Best Practices</a></h2>
<!--- news items about Best Practices -->
This works fine in browser based HTML, but I have not had success getting it to work in various email clients (gmail, groupwise, outlook). I have however, received emails that appear to use a technique like above and I am able to 'scroll' the email. I understand that support in various clients will vary and that this is not necessarily a 'good' practice but this is an internal system and almost all recipients will be using GroupWise.
Any experienced insight into the specific additional markup that is needed (e.g. what would the base ref be?) would be greatly appreciated.
Try adding the 'name' attribute to the anchor as well as the 'id'.
<a id="FUNDING" name="FUNDING">
I found this post when trying to accomplish the same thing, and I followed instructions here to get it to work: http://blog.mailermailer.com/tips-resources/anchor-tags-html-emails
This is the code I ended up with in the first successful test:
<html>
<a name="BACKTOTOP">Index</a>
<ul>
<li>Compliance Courses</li>
<li>Dealer Training</li>
<li>Functional Training Courses</li>
<br>
<h1>
<a name="COMPLIANCE">Compliance</a>
</h1>
<br>
This will be the message for Compliance courses.
<br>
Return to top index
<br>
<h1>
<a name="DEALERTRAINING">Dealer Training</a>
</h1>
<br>
This will be the message for Dealer Training.
<br>
Return to top index
<br>
<h1>
<a name="FUNCTIONALAREA">Functional Training Courses</a>
</h1>
<br>
This will be the message for courses by Functional Area.
<br>
Return to top index
</html>