{"id":11,"date":"2024-01-18T20:20:08","date_gmt":"2024-01-18T20:20:08","guid":{"rendered":"https:\/\/themes.estudiopatagon.com\/wordpress\/zento\/?p=11"},"modified":"2024-01-18T20:20:08","modified_gmt":"2024-01-18T20:20:08","slug":"understanding-html-the-foundation-of-the-web","status":"publish","type":"post","link":"https:\/\/aidailyflow.com\/?p=11","title":{"rendered":"Creating your first web page in pure HTML \ud83c\udf89"},"content":{"rendered":"\n<p>In our previous HTML example, we aimed to provide you with a quick overview to get you started. However, we need to delve deeper into the essential elements of a proper HTML file to ensure clarity and correctness.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"lets-revisit-we-wrote-initially\">Let&#8217;s revisit we wrote initially<\/h3>\n\n\n\n<pre class=\"wp-block-code lang-html\"><code>&lt;p&gt;A paragraph of text&lt;\/p&gt;\n\n&lt;ul&gt;\n  &lt;li&gt;First item&lt;\/li&gt;\n  &lt;li&gt;Second item&lt;\/li&gt;\n  &lt;li&gt;Third item&lt;\/li&gt;\n&lt;\/ul&gt;\n<\/code><\/pre>\n\n\n\n<p>While this allowed us to create a functional HTML page, it lacked some fundamental elements necessary for a well-formed HTML document. Consider the following improved version:<\/p>\n\n\n\n<pre class=\"wp-block-code lang-html\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;p&gt;A paragraph of text&lt;\/p&gt;\n\n    &lt;ul&gt;\n      &lt;li&gt;First item&lt;\/li&gt;\n      &lt;li&gt;Second item&lt;\/li&gt;\n      &lt;li&gt;Third item&lt;\/li&gt;\n    &lt;\/ul&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"now-lets-break-down-the-key-components\">Now, let&#8217;s break down the key components<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>&lt;!DOCTYPE html&gt;<\/code><\/strong>: This declaration, placed at the top, signals to the browser that the document is an HTML file.<\/li>\n\n\n\n<li><code><strong>&lt;html&gt;<\/strong><\/code>: The root element that wraps the entire HTML document. Inside it, you&#8217;ll find the <code>&lt;head&gt;<\/code> and <code>&lt;body&gt;<\/code> sections.<\/li>\n\n\n\n<li><strong><code>&lt;head&gt;<\/code><\/strong>: This section contains meta-information about the document, such as the title, character set, linked stylesheets, and more. In this example, it&#8217;s left empty for simplicity.<\/li>\n\n\n\n<li><strong><code>&lt;body&gt;<\/code><\/strong>: The container for the visible elements of the page. It encompasses the content you want to display, including paragraphs, lists, images, and more.<\/li>\n<\/ul>\n\n\n\n<p>It&#8217;s crucial to note that an HTML document should have only one occurrence of the <code>&lt;html&gt;<\/code>, <code>&lt;body&gt;<\/code>, and <code>&lt;head&gt;<\/code> elements.<\/p>\n\n\n\n<p>Additionally, notice the indentation used in this example. Each nested tag, such as <code>&lt;head&gt;<\/code> inside <code>&lt;html&gt;<\/code> or <code>&lt;ul&gt;<\/code> inside <code>&lt;body&gt;<\/code>, is indented for clarity. Indentation helps maintain a &#8220;tree structure,&#8221; making it easier to visually parse and understand the hierarchy of elements in an HTML file.<\/p>\n\n\n\n<p>Whether you prefer a 2-character or 4-character indentation (or tabs), consistency is key to ensuring a clean and organized HTML structure. Adopting a systematic approach will greatly enhance your ability to navigate and modify HTML files effectively.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our previous HTML example, we aimed to provide you with a quick overview to get you started. However, we need to delve deeper into&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"gallery","meta":{"footnotes":""},"categories":[2,7,8],"tags":[],"class_list":["post-11","post","type-post","status-publish","format-gallery","hentry","category-code","category-guides","category-2-html","post_format-post-format-gallery"],"menu_order":0,"_links":{"self":[{"href":"https:\/\/aidailyflow.com\/index.php?rest_route=\/wp\/v2\/posts\/11","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aidailyflow.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aidailyflow.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aidailyflow.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aidailyflow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11"}],"version-history":[{"count":0,"href":"https:\/\/aidailyflow.com\/index.php?rest_route=\/wp\/v2\/posts\/11\/revisions"}],"wp:attachment":[{"href":"https:\/\/aidailyflow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aidailyflow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aidailyflow.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}