โ abbr
โ dfn
โ em
โ strong
โ mark
โ small
โ q
โ blockquote
โ cite
โ var
โโ code
โโ kbd
โโ samp
โโ data
โโ time
๐ญ Why is this Thread?
โ In a typical web page, we render varieties of text contents. The context of few contents may vary from others.
โ Sometimes we may have to highlight them semantically for SEO and Accessibility purposes.
โ Let's explore 15 such HTML elements.
โ abbr
โ The <abbr> HTML element represents an abbreviation or acronym.
โ Its title attribute can provide an expansion or description for the abbreviation.
Use it when you want to
โง provide expansion or description
โง treat it separately (like styling)
โ dfn
โ If you want to indicate "a term" being defined within the context of a definition phrase or sentence, use <dfn> for that term.
โ If the <dfn> element has a title attribute, it must contain the term being defined and no other text.
โ em
โ The <em> HTML element marks text that has stress emphasis.
โ If you have a word or, few words in a sentence which have a stress emphasis compared to surrounding texts, use <em> element.
โ It's often shown in italics. But that's browser dependent.
โ strong
โ The <strong> HTML element indicates that its contents have strong importance, seriousness, or urgency.
โ Use it for a sentence or, few words that is of great importance to the whole page.
โ It's often shown in bold. But that's browser specific.
โ mark
โ The <mark> HTML element represents text which is "marked" or "highlighted" for reference or notation purposes.
โ One of the best use cases of using this element is to indicate the words that matched a search operation.
โ small
โ <small> renders the text within it one font-size smaller.
โ It represents side-comments and small print, like copyright and legal text.
โ q
โ The <q> HTML element indicates that the enclosed text is a "short inline quotation".
โ This element is intended for short quotations that doesn't require paragraph breaks.
โ Most browsers display the quoted text inside a quotation marks (" and ")
โ blockquote
โ The <blockquote> HTML element indicates that the enclosed text is an "extended quotation".
โ This is usually rendered with an indentation.
โ cite
โ The <cite> HTML element is used to describe a reference to a cited creative work.
โ The creative work could be a tweet, a web page, a blog post, a song, a film, a game, a painting, a legal case report etc.
โ Most browsers display the cited text in italics.
โ var
โ The <var> HTML element represents the name of a variable in a mathematical expression or a programming context.
โ Most browsers may render it in italics.
โโ code
โ The <code> HTML element displays its contents styled in a fashion intended to indicate that the text is a short fragment of computer code.
โ By default, the content text is displayed using the browser's default monospace font.
โโ kbd
โ The <kbd> HTML element represents a span of inline text denoting textual user input from a
โ keyboard
โ voice input
โ any other text entry device
โโ samp
โ The <samp> HTML element is used to enclose "inline text" which represents sample output from a computer program.
โ By default, the content text is displayed using the browser's default monospace font.
โโ data
โ The <data> HTML element links a given piece of content with a machine-readable translation.
โ The value attribute of this element specifies the machine-readable translation of the content.
โโ time
โ The <time> HTML element represents a specific period in time.
โ It may represent one of the following:
โ A time on a 24-hour clock
โ A precise date in the Gregorian calendar
โ A valid time duration
โ ๏ธ Notice โ ๏ธ
โ Did you notice? I didn't provide any code or, sample visuals for any of these elements.
โ Reason? I want you to explore these on your own. I have just given the reference. You could practice on your own to have a solid understanding.
๐ญ Feedbacks
โง Did you find this thread useful?
โง After reading through entire thread, have you learnt something worth?
โง What improvements will you suggest?
Hey ๐. I will be happy to hear from you. Your feedbacks would help me sharing better contents in future.
End of ๐งต
Hey ๐ I am a Tech Educator from India ๐ฎ๐ณ
I am sharing Tutorials, Tips, Techniques, Infographics, Cheat Sheets, Interview Questions and Roadmaps on Web Development, DSA and, Database.
Are you interested? I am sure, you are.
To never miss anything, Follow Me โ
โข โข โข
Missing some Tweet in this thread? You can try to
force a refresh