An Interest In:
Web News this Week
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
3 HTML tags youve never heard of or used before
HTML does have some strange code sometimes. Let's look at the 3 most uncommon tags that are rarely used and what their purpose is.
1. var tag
As far as its usage goes, its meant to simply denote to a browser that a mathematics variable will go inside the tag, so yeah its not so usefull but here's how we can use it.
<p>The area of a triangle is: 1/2 x <var>b</var> x <var>h</var>, where <var>b</var> is the base, and <var>h</var> is the vertical height.</p>
2. samp tag
The samp tag is used to define sample output from a computer program. So its usage is similar to the var tag. Here's an example of how we can use samp.
<p>Message from my computer:</p><p><samp>File not found.<br>Press F1 to continue</samp></p>
3. kbd tag
The kbd tag is used to define keyboard input. The content inside is displayed in the browser's default monospace font. Here's an example:
<p>Press <kbd>Ctrl</kbd> + <kbd>C</kbd> to copy text (Windows).</p><p>Press <kbd>Cmd</kbd> + <kbd>C</kbd> to copy text (Mac OS).</p>
So there you have it, 3 obscure html tags that are not the most useful but will probably make you look more professional when used in the proper context (at work, for demo purposes).
Original Link: https://dev.to/urielbitton/3-html-tags-you-ve-never-heard-of-or-used-before-j12
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To