Now that we have discussed structural tags we can now discuss text content tags. These tags provided significance and meaning to the text on your webpages.
In addition to the <header> structural tag. We also have header tags to signify the title headings within page content. Header tags are used to break up paragraphs and allow users to better locate the content that they are looking for. There are six header tags in order from most important to least important.
<h1></h1> <h2></h2> <h3></h3> <h4></h4> <h5></h5> <h6></h6>
In the browser you will notice that these tags come with default styles. <h1> being the largest and <h6> being the smallest. For SEO purposes it is generally advised to set your most important heading as h1. While I tend to have one h1 heading, having more than one is not the end of the world. Check out this video.
When you want to write a paragraph use the <p> tag. In some cases I have seen the use of the <div> tag but generally always use the <p> tag for blocks of text particularly in blog posts.
The <br> tag is used to set text on a new line also known as a line break. One example would be when formatting a title and youâd like the text to fall to a newline for aesthetics. The break tag is only one tag and does not have an opening and closing tag.
The <hr> tag adds a horizontal line to separate text. This is similar to a <br> tag as it is only one tag and does not have an opening and closing tag.
No fluff. Just real projects, real value, and the path from code to cash — one useful build at a time.