Some Really Awesome Snippets of HTML

Some Really Awesome Snippets of HTML

HTML
stands for Hypertext Markup Language.

HTML is an amazing language and it has multiple uses. It is used for creating your website and it’s used to create your emails and even your chat messages. HTML is also used to create cool and good-looking chat messages and emails and hence we decided to write this article. We will list out some really awesome snippets of HTML

It is used to tell browsers how to display content on the screen. This blog is an index of snippets of HTML that can be used for anything from adding some snazzy to your website to building web applications. And you can create cool and good-looking chat messages and emails.

1. Scroll Box


The HTML scroll box is a box that grows scroll bars when its contents are too large to fit in the box.

<div style="width:50%; height:50px; overflow:auto" >
<!---text here--->
</div>

2. Call & SMS Links

This is the calling one (probably more useful if the clickable text is words, as the Phone auto-detects phone numbers and does this automatically)

<a href="tel:1234567890">123456890</a>
<a href="sms:1234567890">Send Message</a>

3. Downloadable Files

HTML5 allows you to force the download of files using the download attribute. Here is a standard link to a downloadable file

<a href="Path/offile" download="file.pdf">Download file</a>

4. Disable autocomplete

Html allows us to use the autocomplete attribute to turn off autocomplete for input fields

<input type="text" name="foo" autocomplete="off"/>

5. Get map direction

We can get the map direction in HTML using the form with action

<form action="https://maps.google.com/maps" method="get" target="_blank">
	<label for="saddr">Enter Your Location</label>
	<input type="text" name="saddr">
	<input type="submit" value="Get Direction">
</form>

6. Email Validation

This Code Will Help you to Validate email that no one can Fill out the wrong email Id

<input type="text" title="email" required pattern="[^@]+@[^@]+\.[a-zA-Z]{2,6}"/>

You might also like

Leave a Reply

Your email address will not be published. Required fields are marked *