{"id":7881,"date":"2022-09-25T17:31:37","date_gmt":"2022-09-25T17:31:37","guid":{"rendered":"https:\/\/mdr.foobrdigital.com\/?p=7881"},"modified":"2022-09-25T17:31:37","modified_gmt":"2022-09-25T17:31:37","slug":"html-basic-tags","status":"publish","type":"post","link":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/2022\/09\/25\/html-basic-tags\/","title":{"rendered":"HTML Basic Tags"},"content":{"rendered":"\n<p>Understanding basic HTML tags is important while learning HTML. Here are the HTML elements that are used more frequently than others. They are:<\/p>\n\n\n\n<ul><li>the heading&nbsp;&lt;h1&gt;-&lt;h6&gt;&nbsp;tags,<\/li><li>the&nbsp;&lt;p&gt;&nbsp;tag,<\/li><li>the&nbsp;&lt;img \/&gt;&nbsp;tag,<\/li><li>the&nbsp;&lt;a&gt;&nbsp;tag,<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"html-documents-2\">HTML documents<\/h2>\n\n\n\n<p>All HTML documents must start with a declaration which specifies the document type:&nbsp;&lt;!DOCTYPE html&gt;.<\/p>\n\n\n\n<p>The HTML document begins with&nbsp;&lt;html&gt;&nbsp;and ends with &lt;\/html&gt;.<\/p>\n\n\n\n<p>The main part of the HTML document is located between&nbsp;&lt;body&gt;&nbsp;and &lt;\/body&gt;.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-an-html-document-4\">Example of an HTML document:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Title of the document&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;h1&gt;This is heading 1&lt;\/h1&gt;\n    &lt;h2&gt;This is heading 2&lt;\/h2&gt;\n    &lt;p&gt;Here is the paragraph.&lt;\/p&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"html-headings-6\">HTML headings<\/h2>\n\n\n\n<p>The heading elements are used for structuring headings.There are six types of&nbsp;HTML headings&nbsp;starting from &lt;h1&gt; to &lt;h6&gt;.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-html-headings-8\">Example of the HTML headings:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Title of the document&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;h1&gt;This is heading 1&lt;\/h1&gt;\n    &lt;h2&gt;This is heading 2&lt;\/h2&gt;\n    &lt;h3&gt;This is heading 3&lt;\/h3&gt;\n    &lt;h4&gt;This is heading 4&lt;\/h4&gt;\n    &lt;h5&gt;This is heading 5&lt;\/h5&gt;\n    &lt;h6&gt;This is heading 6&lt;\/h6&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Result<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/mdr.foobrdigital.com\/wp-content\/uploads\/2022\/09\/image-38.png\" alt=\"\" class=\"wp-image-7898\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"html-paragraphs-12\">HTML paragraphs<\/h2>\n\n\n\n<p>The&nbsp;&lt;p&gt;&nbsp;element is used for separating HTML paragraphs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-html-paragraphs-14\">Example of the HTML paragraphs:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Title of the document&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;h2&gt;Elements example&lt;\/h2&gt;\n    &lt;p&gt;This is some paragraph.&lt;\/p&gt;\n    &lt;p&gt;This is another paragraph &lt;br\/&gt; with  line break.&lt;\/p&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Result<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/mdr.foobrdigital.com\/wp-content\/uploads\/2022\/09\/image-39.png\" alt=\"\" class=\"wp-image-7900\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"html-images-18\">HTML images<\/h2>\n\n\n\n<p>The attributes of this tag are:<\/p>\n\n\n\n<ul><li>the source file (src),<\/li><li>the alternative text (alt),<\/li><li>width,<\/li><li>height.<\/li><\/ul>\n\n\n\n<p>The&nbsp;&lt;img \/&gt;&nbsp;tag is used for inserting&nbsp;HTML images.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-html-images-20\">Example of the HTML images:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Title of the document&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;h1&gt;This is an image example&lt;\/h1&gt;\n    &lt;img src=\"\/uploads\/media\/default\/0001\/01\/25acddb3da54207bc6beb5838f65f022feaa81d7.jpeg\" alt=\"Aleq\" width=\"200\" height=\"185\"\/&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Result<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/mdr.foobrdigital.com\/wp-content\/uploads\/2022\/09\/image-40.png\" alt=\"\" class=\"wp-image-7901\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"html-links-24\">HTML links<\/h2>\n\n\n\n<p>The&nbsp;&lt;a&gt;&nbsp;tag is used for inserting&nbsp;HTML links. You can specify the destination of the link with the help of&nbsp;href&nbsp;attribute.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-html-links-26\">Example of the HTML links:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html>\n&lt;html>\n  &lt;head>\n    &lt;title>Title of the document&lt;\/title>\n  &lt;\/head>\n  &lt;body>\n    &lt;a href=\"https:\/\/www.google.com\/\">W3docs.com&lt;\/a>\n  &lt;\/body>\n&lt;\/html><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"html-buttons-30\">HTML buttons<\/h2>\n\n\n\n<p>You can specify the HTML buttons with the&nbsp;&lt;button&gt;&nbsp;tag.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-html-lt-button-gt-tag-32\">Example of the HTML &lt;button&gt; tag:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Title of the document&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;h1&gt;Example of the HTML &amp;lt;button&amp;gt; tag:&lt;\/h1&gt;\n    &lt;p&gt;You can specify the HTML buttons with the button tag:&lt;\/p&gt;\n    &lt;button type=\"button\"&gt;Button&lt;\/button&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"html-lists-34\">HTML lists<\/h2>\n\n\n\n<p>HTML lists are specified with the&nbsp;&lt;ul&gt;&nbsp;tag that is used for specifying an unordered list, or with the&nbsp;&lt;ol&gt;&nbsp;tag that is used to create an ordered list, followed by&nbsp;&lt;li&gt;&nbsp;tags.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-html-lists-36\">Example of the HTML lists:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Title of the document&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;h2&gt;An unordered list&lt;\/h2&gt;\n    &lt;ul&gt;\n      &lt;li&gt;Pen&lt;\/li&gt;\n      &lt;li&gt;Pencil&lt;\/li&gt;\n      &lt;li&gt;Ruler&lt;\/li&gt;\n      &lt;li&gt;Book&lt;\/li&gt;\n    &lt;\/ul&gt;\n    &lt;h2&gt;An ordered list&lt;\/h2&gt;\n    &lt;ol&gt;\n      &lt;li&gt;Pen&lt;\/li&gt;\n      &lt;li&gt;Pencil&lt;\/li&gt;\n      &lt;li&gt;Ruler&lt;\/li&gt;\n      &lt;li&gt;Book&lt;\/li&gt;\n    &lt;\/ol&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"html-horizontal-lines-38\">HTML horizontal lines<\/h2>\n\n\n\n<p>The&nbsp;HTML &lt;hr&gt;&nbsp;tag breaks the page into different parts and with the help of a horizontal line, which runs from left to right edge of the page, creates horizontal margins. This is an empty tag.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-html-lt-hr-gt-tag-40\">Example of the HTML &lt;hr&gt; tag:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Title of the document&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;h1&gt;Welcome to W3Docs&lt;\/h1&gt;\n    &lt;hr&gt;\n    &lt;p&gt;\n      Learn to design and build professional website&lt;br&gt; \n      Learn to design and build professional website \n    &lt;\/p&gt;\n    &lt;p&gt;Learn to design and build a professional website&lt;\/p&gt;\n    &lt;hr&gt;\n    &lt;p&gt;Learn to design and build professional website&lt;\/p&gt;\n    &lt;p&gt;Learn to design and build professional website&lt;\/p&gt;\n    &lt;p&gt;Learn to design and build professional website&lt;\/p&gt;\n    &lt;hr&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Understanding basic HTML tags is important while learning HTML. Here are the HTML elements that are used more frequently than others. They are: the heading&nbsp;&lt;h1&gt;-&lt;h6&gt;&nbsp;tags, the&nbsp;&lt;p&gt;&nbsp;tag, the&nbsp;&lt;img \/&gt;&nbsp;tag, the&nbsp;&lt;a&gt;&nbsp;tag, HTML documents All HTML documents must start with a declaration which specifies the document type:&nbsp;&lt;!DOCTYPE html&gt;. The HTML document begins with&nbsp;&lt;html&gt;&nbsp;and ends with &lt;\/html&gt;. The main [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[285],"tags":[],"_links":{"self":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/7881"}],"collection":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/comments?post=7881"}],"version-history":[{"count":0,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/7881\/revisions"}],"wp:attachment":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/media?parent=7881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/categories?post=7881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/tags?post=7881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}