In this post, we are going to look at some different types of HTML text tags that can be used for a variety of purposes. There are many HTML tags out there, but these will help you for formating your text!
HTML text tags list :
- <b>This is bolded text
<b> use for bold text</b>
- <i>This is italicized text
<i> use for italic text</i>
- <u>This is underlined text
<u>This is underlined text </u>
- <p> This is a paragraph.
<p>This is underlined text</p>
- <span> This is a span of text
<span>This is underlined text</span>
- <br/> This is a line break
this is new line text <br/>
- The heading tags you’ll be using the most are:
– H1, H2, H3, H4, H5, H6 tags
<h1> Hello world </h1>
You can use headings to style content: with a little more emphasis, or as subheadings for sections of your blog post that need their own introduction, and so on.
- <strong>This is bolded text and it will show up in Google search results as such!
<strong> This is strong tag </strong>
- <em> Use italics for emphasis
<em> This is italic </em>
There are many different HTML tags out there that can be used for a variety of purposes, but these should help you in formatting your text.
Some more tags you can use for formatting text like
- <ul>, you can create lists out an unordered list of items
- <li>you can use an ordered list of items for your menu or make a numbered list.
- <ol> you can use an ordered list of items for your agenda or a set of instructions.
- <dl> you can use this to create a definition list of terms.
- <dt> and this is an HTML tag for defining terms.
- <hr> are horizontal lines that divide content on the page, or as separators between different sections
- <sup> are superscript text, and this is the HTML tag for that
- <sub> is subscript text, and this is the HTML tag for that
- <mark> is the text that should be highlighted or set apart from the other content, and this is the HTML tag for it
- <ins> is the text that should be highlighted or set apart from the other content, and this is the HTML tag for it
- <pre> you can use this tag to pre-format your text so that it looks like a code snippet.
- <del> this is the HTML tag for deleted text
What attributes we can use on above HTML text tag
We can use the following attributes:
- title=” ” sets a title for an HTML tag, like this example of a level line.
- class=”” set’s the CSS class that will be applied to an HTML text tag. For instance, in order to turn your HR (horizontal line) into italicized text, you would use the following code:
- style=”” sets CSS styles that should be applied to an html text tag.
- id=” ” is used for assigning a unique identifier to each HTML element, like this example of a level line.
We can also add attributes such as ‘tabindex’ or ‘access key. For instance, if you would like to make your HR (horizontal line) into italicized text, you could add the following attributes:
you can use global attributes for these tags.
There are many other tags you can use to make your text flow nicely on the page or create sidebars for sidebar content!
We hope you’ve enjoyed this blog post and found it to be helpful. Remember that if you have any questions or need help with your website, we are always happy to assist. And as always, feel free to contact us anytime!