Skip to main content

5 less known HTML tags

Here are the list of 5 less known HTML tags.

base tag

The <base> tag in HTML is used to provide  a base URL. You can specify the base URL at the top of the page and other links of the page will use the this URL as their base. The base tag must be placed in documents <head> tag and each document can have only one base tag.
<html>
<head>
	<title> Base tag example </title>
    <base href="http://abc.com/" >
</head>
</body>
	</p><a   href="alphabets/"> The URL will be http://abc.com/alphabets/ </a>/p>
</body>

template Tag


<template> tags are very useful if you need to render the same content multiple times. You can write a JavaScript code to do it for you. Even if you need to change a little bit of content you can do it before inserting it to the page.

Template tags in HTML contains content users cant see, then later JavaScript can be used to render it as many times as we want in the page.

<button onclick="showContent()">Show Me Some Stuff!</button>

<template>
    <p>Hey look! It's stuff!</p>
    <img src="stuff.jpg">
</template>

<script>
function showContent() {
    var temp = document.getElementsByTagName("template")[0]; // gets the first template in the page
    var clon = temp.content.cloneNode(true); // a clone of the template
    document.body.appendChild(clon); // adds the template to the bottom of the page
}
</script>


details Tag


<details> tag in HTML can be used to show a summary of a object like in the below example:

Click me to learn about HTML Details Tag
By default the content in this tag are hidden but can be seen when clicked on it.
<details>
	<summary>Click me to learn about HTML Details Tag!</summary>
	By default the content in this tag are hidden but can be seen when clicked on it.
</details>


wbr Tag


<wbr> tag in HTML gives the browser a specific place to break up the word if it is needed. This is the tag you should look for creating the layouts that you want to avoid horizontal scroll bars.


abbr Tags


<abbr> tags is for defining a abbreviation. The abbr tags can help the visually impaired, who need text to speech software. It is similar to <acronym> tag, expect the abbr tag is only used to define abbreviated words. The abbr tag can help screen readers, spellcheckers and search engine.

Comments

Popular posts from this blog

Web development roadmap for beginners

Welcome to the world of web development! Whether you're a beginner or just looking to brush up on your skills, this roadmap will guide you through the essential steps of creating a website. Step 1: Learn the basics of HTML and CSS HTML (Hypertext Markup Language) and CSS (Cascading Style Sheets) are the building blocks of any website. HTML is used to structure the content of a website, while CSS is used to style and layout that content. Before you can move on to more advanced web development techniques, you'll need to have a solid understanding of these two languages. Step 2: Learn JavaScript JavaScript is a programming language that is used to make websites interactive. You can use JavaScript to create things like drop-down menus, pop-up windows, and interactive forms. Once you've learned the basics of HTML, CSS, and JavaScript, you'll be able to create a basic website that can interact with your visitors. Step 3: Learn a web development framework Web development frame...

Linux in web development

 Linux is a popular choice among web developers because of its stability, security, and flexibility. It is an open-source operating system that is widely used in many different industries, from personal computers to servers and supercomputers. One of the biggest advantages of using Linux in web development is that it is free to use and modify. This means that developers can access the source code and make changes to it, making it a great option for developing web applications. Additionally, Linux is known for its robust security features, making it a popular choice for web servers and other critical infrastructure. Another advantage of Linux in web development is its flexibility. Linux can run on a wide range of hardware, from small embedded devices to supercomputers. This makes it a great option for businesses of all sizes, as well as for developers who want to use it on their personal computers. In addition to its flexibility and security features, Linux is also known for its vas...

History of web development

The history of web development dates back to the early days of the internet, when the World Wide Web (WWW) was first introduced in 1989 by Tim Berners-Lee, a computer scientist at CERN (the European Organization for Nuclear Research). At the time, the internet was primarily used for research and communication among scientists and academics, and there was no easy way to share information or access documents online. Berners-Lee proposed a new way of organizing and sharing information on the internet, which he called the World Wide Web. The first website was created in 1991 by Berners-Lee, and it was hosted on a NeXT computer at CERN. The website provided information about the World Wide Web project, and it was written in HTML (Hypertext Markup Language), which is the standard language used to create web pages. In the early days of the web, web development was primarily done by researchers and academics who had access to the necessary tools and knowledge. However, as the web began to grow...