{"id":12201,"date":"2016-04-23T22:45:40","date_gmt":"2016-04-24T02:45:40","guid":{"rendered":"http:\/\/blog.shareaholic.com\/?p=12201"},"modified":"2016-04-23T22:50:36","modified_gmt":"2016-04-24T02:50:36","slug":"html-101-for-bloggers","status":"publish","type":"post","link":"https:\/\/www.shareaholic.com\/blog\/html-101-for-bloggers\/","title":{"rendered":"HTML 101: The Complete Guide to Understanding Code on Your Blog"},"content":{"rendered":"<div id=\"attachment_12265\" style=\"width: 293px\" class=\"wp-caption alignright\"><a href=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/7702900836_0106e4e49a_c.jpg\"><img aria-describedby=\"caption-attachment-12265\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-12265  \" alt=\"HTML 101 for Bloggers\" src=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/7702900836_0106e4e49a_c.jpg\" width=\"283\" height=\"283\" srcset=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/7702900836_0106e4e49a_c.jpg 800w, https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/7702900836_0106e4e49a_c-400x400.jpg 400w, https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/7702900836_0106e4e49a_c-300x300.jpg 300w, https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/7702900836_0106e4e49a_c-768x768.jpg 768w\" sizes=\"(max-width: 283px) 100vw, 283px\" \/><\/a><p id=\"caption-attachment-12265\" class=\"wp-caption-text\">Photo by <a href=\"http:\/\/www.flickr.com\/photos\/rinoshea\/\">ryanoshea<\/a>.<\/p><\/div>\n<p style=\"text-align: left;\"><em>Make your website awesome with Shareaholic. <a href=\"https:\/\/shareaholic.com\/publishers\">Get our free tools now<\/a>.<\/em><\/p>\n<p style=\"text-align: left;\">Let\u2019s be real. When most of us started our first blog, we didn\u2019t sign up to learn how to code\u2014I know I didn\u2019t. I was excited to express myself, learn a ton and maybe even get a job out of it.<\/p>\n<p>Once I <a href=\"https:\/\/www.shareaholic.com\/blog\/2012\/09\/startup-job-culture\/\">joined Shareaholic<\/a> and began <a href=\"https:\/\/www.shareaholic.com\/blog\/2012\/10\/how-to-blog-every-day-nablopomo\/\">blogging more often<\/a>, I realized that I needed to get myself in gear and learn some basic HTML. And here\u2019s a reality check: you do too. No matter how many pageviews you have, having an understanding of HTML is key to having a successful blog.<\/p>\n<p>Need to force an image to stay on the right of your post instead of drifting to the middle? HTML.<\/p>\n<p>Need to install <a href=\"https:\/\/www.shareaholic.com\/publishers\/analytics\">analytics<\/a> to track your success? HTML.<\/p>\n<p>Don\u2019t want to bother your web designer with the small stuff? HTML.<\/p>\n<p>You don\u2019t need to be a coding genius to rock your blog, but you should have a basic understanding of the terminology and a few tags up your sleeve to take your blog posts to the next level.<\/p>\n<h2>Understanding HTML<\/h2>\n<p>Before we get into the tags you need to know, I wanted to give you a quick intro into some general HTML terminology and structure. This way, you\u2019ll understand what I\u2019m talking about later in the post once we get to the top tags you should know.<\/p>\n<h3 class=\"sub header\">Opening and closing tags<\/h3>\n<p>In any piece of code, there will be an opening and closing tag. The opening tag starts off the sequence with a left angle bracket, a character (or two) signifying what the tag is supposed to do, and a right angle bracket. A closing tag ends the sequence in the same manner\u2014it looks just like the opening tag, but it has a forward slash before the character. Here\u2019s a visual breakdown for you:<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/Slide1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter  wp-image-12241\" alt=\"opening and closing tags 2\" src=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/Slide1.png\" width=\"563\" height=\"247\" srcset=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/Slide1.png 694w, https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/Slide1-300x131.png 300w, https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/Slide1-400x175.png 400w\" sizes=\"(max-width: 563px) 100vw, 563px\" \/><\/a><\/p>\n<h3 class=\"sub header\">Include the object or text you want to modify in between<\/h3>\n<p>Think of opening and closing tags like a container for content. The opening and closing tags surround all the elements they are modifying\u2014anything in that \u201cbucket\u201d of HTML will obey the rules of the opening and closing tags.<\/p>\n<p>It\u2019s very important to understand what opening and closing brackets are and how to place elements in between them when you first start to understand code\u2014they give you a reference point for what\u2019s happening in the code. You&#8217;ll also be a pro at copying and inserting any code on your blog since you have an idea of where code starts and stops.<\/p>\n<h2 class=\"sub header\">X HTML Tags You Should Know<\/h2>\n<h3 class=\"sub header\">1. Site structure<\/h3>\n<p align=\"center\"><strong>&lt;head&gt; &lt;\/head&gt;<\/strong><\/p>\n<p>This tag is at the top of the page. In between these two brackets, you\u2019ll see information about the page (including the <a href=\"https:\/\/www.shareaholic.com\/blog\/2012\/10\/seo-guidelines-headlines-vs-page-titles\/\">page title<\/a>) any <a href=\"https:\/\/www.shareaholic.com\/blog\/2013\/01\/understanding-blog-analytics\/\">analytics you have installed<\/a>, and theme styling code for the rest of the page. Think of this section of HTML as the description of your page.<\/p>\n<p align=\"center\"><strong>&lt;body&gt; &lt;\/body&gt;<\/strong><\/p>\n<p>Everything between these two tags appears in the body of your webpage\u2014aka, what your readers see whenever they visit your site. All of the HTML code for your post and any widgets that people can see directly go here.<\/p>\n<p><i>Note: You don\u2019t have to paste these tags in your post\u2014they are part of your site structure already.\u00a0<\/i><\/p>\n<h3 class=\"sub header\">2. Organize with headings<\/h3>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/1-headings.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter  wp-image-12216\" alt=\"1 - headings\" src=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/1-headings.jpg\" width=\"545\" height=\"276\" srcset=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/1-headings.jpg 606w, https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/1-headings-300x152.jpg 300w, https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/1-headings-400x203.jpg 400w\" sizes=\"(max-width: 545px) 100vw, 545px\" \/><\/a><\/p>\n<p>We\u2019ve talked a lot about the importance of <a href=\"https:\/\/www.shareaholic.com\/blog\/2011\/12\/7-habits-of-highly-shareable-bloggers\/\">using headers in your blog posts<\/a>. They\u2019re a great way to break up your text, making it easy to skim and understand. There are three different sizes of headings: H1 is the biggest, H2 is the second biggest, and so on. I\u2019d recommend not using more than two different types of headers in your posts because having too many becomes distracting to readers.<\/p>\n<h3 class=\"sub header\">3. Create links<\/h3>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/2-link.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter  wp-image-12217\" alt=\"2 - link\" src=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/2-link.jpg\" width=\"543\" height=\"136\" srcset=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/2-link.jpg 603w, https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/2-link-300x75.jpg 300w, https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/2-link-400x100.jpg 400w\" sizes=\"(max-width: 543px) 100vw, 543px\" \/><\/a><\/p>\n<p>This is probably the most important tag for a blogger to know&#8211;readers expect bloggers to include relevant links in their posts. Place the link you want to use in between those quotation marks in the opening tag and you are good to go.<\/p>\n<h3 class=\"sub header\">4. Embed images<\/h3>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/3-image.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter  wp-image-12218\" alt=\"3 - image\" src=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/3-image.jpg\" width=\"542\" height=\"272\" srcset=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/3-image.jpg 602w, https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/3-image-300x150.jpg 300w, https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/3-image-400x201.jpg 400w\" sizes=\"(max-width: 542px) 100vw, 542px\" \/><\/a><\/p>\n<p>This is probably the second most important snippet you should know. Whether you\u2019re sending an email to your blog subscribers or putting together the most pinable post ever, using HTML for images is important. Notice that you should include the link to the image itself, the size of the image in pixels and then the alt tag. The last part is especially <a href=\"https:\/\/www.shareaholic.com\/blog\/2012\/04\/5-quick-seo-fixes-you-should-stop-ignoring\/\">important for SEO purposes<\/a>.<\/p>\n<h3 class=\"sub header\">5. Link images<\/h3>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/4-image-as-a-link.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter  wp-image-12219\" alt=\"4 - image as a link\" src=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/4-image-as-a-link.jpg\" width=\"544\" height=\"341\" srcset=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/4-image-as-a-link.jpg 604w, https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/4-image-as-a-link-300x188.jpg 300w, https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/4-image-as-a-link-400x251.jpg 400w\" sizes=\"(max-width: 544px) 100vw, 544px\" \/><\/a><\/p>\n<p>Now, to make an image a link (like our CTA at the bottom of this post), all you have to do is surround the image code from step #4 in a the code for a link (step #3)&#8211;basically you are replacing the &#8220;text you want to link to&#8221; text and inserting the code for embedding images.<\/p>\n<h3 class=\"sub header\">6. Align images and text<\/h3>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/5-align.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter  wp-image-12220\" alt=\"5 - align\" src=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/5-align.jpg\" width=\"539\" height=\"226\" srcset=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/5-align.jpg 599w, https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/5-align-300x126.jpg 300w, https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/5-align-400x168.jpg 400w\" sizes=\"(max-width: 539px) 100vw, 539px\" \/><\/a><\/p>\n<p>There are few things more frustrating than when an object won\u2019t align the way you intended it. No matter how many times you click the alignment buttons, the image or text stays stuck a different way. To specific a certain alignment, include &lt;p align=\u201dleft\u201d&gt;before the thing you want to align and &lt;\/p&gt; after.<\/p>\n<p><em>Note: Most people recommend using CSS, the language used to style your blog, to align aspects of your site. While this is generally a good rule, I\u2019d recommend using the above alignment codes when you\u2019re trying to fix a specific object that isn\u2019t properly aligned already.<\/em><\/p>\n<h3 class=\"sub header\">7. Blockquote<\/h3>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/6-blockquote.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter  wp-image-12221\" alt=\"6 - blockquote\" src=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/6-blockquote.jpg\" width=\"550\" height=\"150\" srcset=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/6-blockquote.jpg 680w, https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/6-blockquote-300x81.jpg 300w, https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/6-blockquote-400x108.jpg 400w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><\/p>\n<p>A great way to spruce up the formatting of someone\u2019s quote with HTML is with the block quote. This snippet of code styles the quote differently than the rest of your body, making it clear that someone else said or wrote the that text.<\/p>\n<h3 class=\"sub header\">8. Numbers (ordered lists)<\/h3>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/7-Numbered-List.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter  wp-image-12222\" alt=\"7 - Numbered List\" src=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/7-Numbered-List.jpg\" width=\"550\" height=\"150\" \/><\/a><\/p>\n<p>If you want to make a numbered list, this is the tag for you. For all of those top 10 blog post lists, this tag will be your best friend.<\/p>\n<h3 class=\"sub header\">9. Bullets (unordered lists)<\/h3>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/8-Bullets.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter  wp-image-12223\" alt=\"8 - Bullets\" src=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/8-Bullets.jpg\" width=\"550\" height=\"150\" \/><\/a><\/p>\n<p>If you want a list without numbers, use this tag. Great for highlighting a few quick points under a main idea in your post, especially if your post is running long.<\/p>\n<h3 class=\"sub header\">10. Formatting fonts<\/h3>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/9-Formatting.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter  wp-image-12224\" alt=\"9 - Formatting\" src=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/9-Formatting.jpg\" width=\"550\" height=\"150\" \/><\/a><\/p>\n<p>Super simple stuff. If you want to make some parts of your post stand out, these tags are essential.<b>\u00a0<\/b><\/p>\n<p>See, that wasn\u2019t so bad! You&#8217;ll be a coding wizard in no time.<\/p>\n<p><em><strong>To our more experienced bloggers\u2014what pieces of HTML do you use daily? What do you wish you knew how to do in HTML? Share your thoughts with us below.<\/strong><\/em><\/p>\n<p><a href=\"https:\/\/www.shareaholic.com\/blog\/shareaholic-email-signup\/\"><img decoding=\"async\" class=\"aligncenter\" alt=\"Shareaholic Email Signup\" src=\"https:\/\/www.shareaholic.com\/blog\/wp-content\/uploads\/2013\/01\/shareaholic-newsletter-cta.png\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Make your website awesome with Shareaholic. Get our free tools now. Let\u2019s be real. When most of us started our first blog, we didn\u2019t sign&hellip;&nbsp;<br \/><a class=\"continue-reading\" href=\"https:\/\/www.shareaholic.com\/blog\/html-101-for-bloggers\/\">Continue Reading<\/a><\/p>\n","protected":false},"author":40,"featured_media":12265,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[522],"tags":[295,358],"_links":{"self":[{"href":"https:\/\/www.shareaholic.com\/blog\/wp-json\/wp\/v2\/posts\/12201"}],"collection":[{"href":"https:\/\/www.shareaholic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shareaholic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shareaholic.com\/blog\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shareaholic.com\/blog\/wp-json\/wp\/v2\/comments?post=12201"}],"version-history":[{"count":0,"href":"https:\/\/www.shareaholic.com\/blog\/wp-json\/wp\/v2\/posts\/12201\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.shareaholic.com\/blog\/wp-json\/wp\/v2\/media\/12265"}],"wp:attachment":[{"href":"https:\/\/www.shareaholic.com\/blog\/wp-json\/wp\/v2\/media?parent=12201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shareaholic.com\/blog\/wp-json\/wp\/v2\/categories?post=12201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shareaholic.com\/blog\/wp-json\/wp\/v2\/tags?post=12201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}