Html for mail
You're looking for HTML code for an email!
Here's a basic template you can use as a starting point:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Subject Line</title>
<style>
/* Add some basic styling to make it look decent */
body {
font-family: Arial, sans-serif;
font-size: 16px;
line-height: 1.5;
color: #333;
}
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
color: #00698f;
}
p {
margin-bottom: 20px;
}
</style>
</head>
<body>
<h1>Subject Line</h1>
<p>Hello [Name],</p>
<p>This is a sample email.</p>
<p>Best regards,</p>
<p>Your Name</p>
</body>
</html>
Here's a breakdown of what's going on:
<!DOCTYPE html>
: This is the document type declaration, which tells the browser that this is an HTML document.<html>
: This is the root element of the HTML document.<head>
: This element contains metadata about the document, such as the character encoding, title, and styles.<meta charset="UTF-8">
: This sets the character encoding of the document to UTF-8, which is a common encoding standard.<meta name="viewport" content="width=device-width, initial-scale=1.0">
: This sets the viewport settings for mobile devices, which allows the email to scale correctly on different devices.<title>Subject Line</title>
: This sets the title of the email, which appears in the subject line of the email client.<style>
: This element contains CSS styles for the email.<body>
: This element contains the content of the email.<h1>
,<h2>
,<h3>
, etc.: These elements are used to create headings in the email.<p>
: These elements are used to create paragraphs of text in the email.
You can customize this template to fit your needs by adding or removing elements, and by modifying the styles to match your brand's visual identity.
Keep in mind that email clients can be finicky, so it's a good idea to test your email in different clients and devices to ensure it looks and functions as expected.