Photo by Ilya Pavlov on Unsplash
HTML Unveiled: Mastering Essential Tags ๐ฎ
Exploring the Unknown Tags !
HTML tags or elements are made to wrap, mark or enclose to make them act in a certain way, but it doesn't mean that you use them to avoid the CSS part. Well everyone has their best practices defined but there is nothing more specific until you know what you're trying to do.
let's jump to the code(I know most of you don't consider it to be the code) to directly learn different behaviors and the emphasis on using those tags and learning to use them correctly.
- <pre> Element
<h2> Dreams - By Langston Hughes</h2>
<pre>
Hold fast to dreams <br>
For if dreams die <br>
Life is a broken-winged bird <br>
That cannot fly. <br>
</pre>
Pre will be rendered with a monospaced font and with all of your extra white space intact.
It gives an extra indent to highlight the context.
Useful when you want to showcase a block of code.
Formatted Strings
<h2>
formatting
</h2>
<p>
<div>I am looking to <strong>hire</strong> a team for dev work. </div>
<div>I am looking to <em>hire</em> a team for dev work. </div>
<div>I am looking to <small>hire</small> a team for dev work. </div>
<div>I am looking to <sub>hire</sub> a team for dev work. </div>
<div>I am looking to <super>hire</super> a team for dev work. </div>
<div>I am looking to <ins>hire</ins> a team for dev work. </div>
<div>I am looking to <del>hire</del> a team for dev work. </div>
<div>I am looking to <mark>hire</mark> a team for dev work. </div>
</p>
<Strong>
would bring emphasis to a particular word or sentence by making it bolder or increasing its font-weight<em>
would emphasize the word enclosed in the tag<small>
tag would reduce the font size of the given enclosed in the tagsuperscript and subscript can be achieved by the tags
super
andsub
ins
would underline the word enclosed anddel
willstrikelinemark
is an interesting tag to highlight the keyword, just like highlighting a word in a line with the yellow marker
That's all for this topic, Let me know which is your favorite tag ๐ค