{"id":7897,"date":"2021-08-13T07:10:20","date_gmt":"2021-08-13T07:10:20","guid":{"rendered":"https:\/\/www.scmgalaxy.com\/tutorials\/?p=7897"},"modified":"2021-08-13T07:10:21","modified_gmt":"2021-08-13T07:10:21","slug":"html-div-tag","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/","title":{"rendered":"HTML: div tag"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The HTML &lt;div&gt;\u2026..&lt;\/div&gt; tag is used define a section of document. Using div tag, you can group large sections of HTML elements together and format them with CSS. The &lt;div&gt; element is very often used together with CSS, to layout a web page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By default, browsers always place a line break before and after the &lt;div> element. However, this can be changed with CSS.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Inside: Body tag<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;html>\r\n\t&lt;head> &lt;\/head>\r\n\t&lt;body>\r\n\t\t&lt;p>paragraph outside div tag&lt;\/p>\r\n\r\n\t\t&lt;div style=\"color: red\">\r\n  \t\t         &lt;h3>heading tag is inside div tag&lt;\/h3>\r\n  \t\t          &lt;p>paragraph tag is inside div tag&lt;\/p>\r\n\t\t&lt;\/div>\r\n\r\n\t&lt;\/body>\r\n&lt;\/html><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"539\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_inside_h3_and_p-1-1024x539.png\" alt=\"\" class=\"wp-image-7900\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_inside_h3_and_p-1-1024x539.png 1024w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_inside_h3_and_p-1-300x158.png 300w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_inside_h3_and_p-1-768x404.png 768w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_inside_h3_and_p-1-1536x808.png 1536w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_inside_h3_and_p-1.png 1924w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Outside: Body tag<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;html>\r\n\t&lt;head>\r\n\t\t&lt;style>\r\n\t\t\tdiv {\r\n    \t\t\t\tcolor: red;\r\n\t\t\t       }\r\n\t\t&lt;\/style>\r\n\t&lt;\/head>\r\n\t&lt;body>\r\n\t\tThis is body. \r\n\t&lt;div> inside div tag which is calling form the out side of the body&lt;\/div>\r\n\t&lt;\/body>\r\n&lt;\/html>\r\n\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"552\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_calling_from_the_ouside-1-1024x552.png\" alt=\"\" class=\"wp-image-7901\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_calling_from_the_ouside-1-1024x552.png 1024w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_calling_from_the_ouside-1-300x162.png 300w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_calling_from_the_ouside-1-768x414.png 768w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_calling_from_the_ouside-1-1536x828.png 1536w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_calling_from_the_ouside-1.png 1908w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>The HTML &lt;div&gt;\u2026..&lt;\/div&gt; tag is used define a section of document. Using div tag, you can group large sections of [&hellip;]<\/p>\n","protected":false},"author":34,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[4864],"tags":[6274,6271,6272,6273,1122,4459,593,213],"class_list":["post-7897","post","type-post","status-publish","format-standard","hentry","category-html","tag-div-tag-calling-from-the-outside-of-the-body-tag","tag-div-tag-in-html","tag-div-tag-use-in-html","tag-div-tag-use-inside-of-the-body","tag-guide","tag-html","tag-process","tag-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>HTML: div tag - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HTML: div tag - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"The HTML &lt;div&gt;\u2026..&lt;\/div&gt; tag is used define a section of document. Using div tag, you can group large sections of [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-13T07:10:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-13T07:10:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_inside_h3_and_p-1-1024x539.png\" \/>\n<meta name=\"author\" content=\"vikashdev k\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"vikashdev k\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-div-tag\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-div-tag\\\/\"},\"author\":{\"name\":\"vikashdev k\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/ec4d1004b3acffc7df65899e880c7515\"},\"headline\":\"HTML: div tag\",\"datePublished\":\"2021-08-13T07:10:20+00:00\",\"dateModified\":\"2021-08-13T07:10:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-div-tag\\\/\"},\"wordCount\":81,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-div-tag\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/div_tag_inside_h3_and_p-1-1024x539.png\",\"keywords\":[\"div tag calling from the outside of the body tag\",\"div tag in html\",\"div tag use in html\",\"div tag use inside of the body\",\"Guide\",\"HTML\",\"Process\",\"Tutorial\"],\"articleSection\":[\"HTML\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-div-tag\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-div-tag\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-div-tag\\\/\",\"name\":\"HTML: div tag - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-div-tag\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-div-tag\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/div_tag_inside_h3_and_p-1-1024x539.png\",\"datePublished\":\"2021-08-13T07:10:20+00:00\",\"dateModified\":\"2021-08-13T07:10:21+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/ec4d1004b3acffc7df65899e880c7515\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-div-tag\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-div-tag\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-div-tag\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/div_tag_inside_h3_and_p-1.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/div_tag_inside_h3_and_p-1.png\",\"width\":1924,\"height\":1012},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-div-tag\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML: div tag\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/ec4d1004b3acffc7df65899e880c7515\",\"name\":\"vikashdev k\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g\",\"caption\":\"vikashdev k\"},\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/vikashdev\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HTML: div tag - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/","og_locale":"en_US","og_type":"article","og_title":"HTML: div tag - scmGalaxy","og_description":"The HTML &lt;div&gt;\u2026..&lt;\/div&gt; tag is used define a section of document. Using div tag, you can group large sections of [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/","og_site_name":"scmGalaxy","article_published_time":"2021-08-13T07:10:20+00:00","article_modified_time":"2021-08-13T07:10:21+00:00","og_image":[{"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_inside_h3_and_p-1-1024x539.png","type":"","width":"","height":""}],"author":"vikashdev k","twitter_card":"summary_large_image","twitter_misc":{"Written by":"vikashdev k","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/"},"author":{"name":"vikashdev k","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/ec4d1004b3acffc7df65899e880c7515"},"headline":"HTML: div tag","datePublished":"2021-08-13T07:10:20+00:00","dateModified":"2021-08-13T07:10:21+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/"},"wordCount":81,"commentCount":0,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_inside_h3_and_p-1-1024x539.png","keywords":["div tag calling from the outside of the body tag","div tag in html","div tag use in html","div tag use inside of the body","Guide","HTML","Process","Tutorial"],"articleSection":["HTML"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/","name":"HTML: div tag - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_inside_h3_and_p-1-1024x539.png","datePublished":"2021-08-13T07:10:20+00:00","dateModified":"2021-08-13T07:10:21+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/ec4d1004b3acffc7df65899e880c7515"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_inside_h3_and_p-1.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/div_tag_inside_h3_and_p-1.png","width":1924,"height":1012},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-div-tag\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"HTML: div tag"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/ec4d1004b3acffc7df65899e880c7515","name":"vikashdev k","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g","caption":"vikashdev k"},"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/vikashdev\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7897","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=7897"}],"version-history":[{"count":1,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7897\/revisions"}],"predecessor-version":[{"id":7902,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7897\/revisions\/7902"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=7897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=7897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=7897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}