DEV Community

Cover image for 5 HTML Tags That Almost Nobody Knows
Aya Bouchiha
Aya Bouchiha

Posted on • Edited on

5 HTML Tags That Almost Nobody Knows

hello everyone, I'm Aya Bouchiha, today, I will talk about 5 HTML tags that almost nobody knows.

<mark>

<mark> is a tag used to highlight or mark a part of a text. This tag supports all HTML global attributes, the default color is black with a yellow background color.

<!DOCTYPE html>
<html>
    <head> </head>
    <body>
        <p>
            in this paragraph, there is a text
            <!-- 
                by default => (
                    color: black;                
                    background-color: yellow;
                )
             -->
            <mark>highlighted</mark>
        </p>
    </body>
</html>
Enter fullscreen mode Exit fullscreen mode

Output:

mark HTML tag Aya Bouchiha

You can change the yellow color like this:

<mark style="background-color:green">highlighted</mark>
Enter fullscreen mode Exit fullscreen mode

Output:

mark HTML tag Aya Bouchiha

<address>

<address> is a tag that displays the contact information like email and phone number of the author of a document or an article, additionally, it supports all Html global attributes.

<!DOCTYPE html>
<html>
    <head> </head>
    <body>
        <address>
            Posted by
            <a href="https://t.me/AyaBouchiha"> Aya Bouchiha </a>
            <br />
            Email Address:
            <a href="mailto:developer.aya.b@gmail.com">
                developer.aya.b@gmail.com
            </a>
            <br />
            Phone Number:
            <a href="tel:+212600000000">+212600000000 </a>
            <br />
            Morocco, Azemmour
        </address>
    </body>
</html>
Enter fullscreen mode Exit fullscreen mode

Output:
Aya Bouchiha html tags address

<noscript>

<noscript>: this tag can be inside a head or body tag, it displays alternate HTML content if the script type is not supported or if the browser has scripting disabled. if not the tag will not display the alternate HTML. But you have to be careful, <noscript> tag sometimes impacts the SEO due to writing the same sentence on every page of your website... solutions & more details.

<!DOCTYPE html>
<html>
    <body>
        <script>
            alert("javascript is supported in your browser :)");
        </script>
        <noscript> Javascript is not supported in your browser :( </noscript>
    </body>
</html>
Enter fullscreen mode Exit fullscreen mode

Output:

noscript HTML tag Aya Bouchiha

<time>

<time>: represents a specific period in time. It may include the datetime attribute to translate dates into a machine-readable format, allowing for better search engine results or custom features such as reminders. (supports all global HTML attributes) more details...

<html>
    <head></head>
    <body>
        <p>
            The next meeting will be held on 
            <time datetime="2021-11-25">
                Nov 25
            </time>
            in Rabat
        </p>
    </body>
</html>
Enter fullscreen mode Exit fullscreen mode

Output:

time HTML tag Aya Bouchiha

<var>

<var>: supports all HTML global attributes and indicates the name of mathematical variables such as x and y, by default its text content is italic.

<html>
    <head></head>
    <body>
        <div>
            <!--
                by default (
                    var {
                        font-style: italic;
                    }
                )
            -->
            <p>Ex:1 solve this equation:</p>
            <var>4x</var> + <var>2y</var> = 12
        </div>
    </body>
</html>

Enter fullscreen mode Exit fullscreen mode

Output:

var HTML tag Aya Bouchiha

Summary

<mark>: for highlighting text.

<address>: for showing contact informtation.

<noscript>: for displaying alternate HTML content if the browser does not support scripting.

<time>: representing a specific period in time.

<var>: for indicating mathematical variables like x & y.

Happy coding!
#day_32

Latest comments (50)

Collapse
 
masedi profile image
Edi Septriyanto

Mark and var is my first time know about it.. Thanks

Collapse
 
ayabouchiha profile image
Aya Bouchiha

My pleasure 😁

Collapse
 
dominikbraun profile image
DB • Edited

Well, if today's web developers don't know the <noscript> tag, things are worse than I thought.

Collapse
 
sohamkakkar profile image
Soham-Kakkar

I knew every one of them except the "time" tag.

Collapse
 
ayabouchiha profile image
Aya Bouchiha

Good!😁

Collapse
 
rel555 profile image
rel555

How are they in terms of security?

Collapse
 
kwnj profile image
Jeff • Edited

Thanks, I didn't know about <mark>, definitely will be using this for the search results in my applications.

Collapse
 
ayabouchiha profile image
Aya Bouchiha

My pleasure !
Have an amazing day!

Collapse
 
beyarz profile image
Beyar

This actually surprised me, what a great article!

Collapse
 
ayabouchiha profile image
Aya Bouchiha • Edited

Glad to hear that, Thank you a lot.
Have an amazing day!

Collapse
 
midouwebdev profile image
MidouWebDev

Thanks Aya !
I didn't know about these tags !
Btw, i am also from Morocco 😄

Collapse
 
ayabouchiha profile image
Aya Bouchiha

You're welcome.
You contact me in telegram
Have a nice day!

Collapse
 
vighneshnilajakar profile image
Vighnesh Nilajakar

Already knew about address : p

Collapse
 
ayabouchiha profile image
Aya Bouchiha

😁

Collapse
 
sheeraz1022 profile image
sheeraz1022

Thanks a lot for sharing these bite sized learnings.

Collapse
 
ayabouchiha profile image
Aya Bouchiha

You're always welcome !

Collapse
 
tsadarsh profile image
Adarsh TS

Really insightful. Thank you for sharing.

Collapse
 
ayabouchiha profile image
Aya Bouchiha

My pleasure 😊