{"id":194,"date":"2025-08-18T11:04:45","date_gmt":"2025-08-18T11:04:45","guid":{"rendered":"https:\/\/www.examtopics.info\/blog\/?p=194"},"modified":"2026-10-29T23:12:53","modified_gmt":"2026-10-29T23:12:53","slug":"html-basic-tags-explained-full-list-with-examples-for-web-development","status":"publish","type":"post","link":"https:\/\/www.examtopics.info\/blog\/html-basic-tags-explained-full-list-with-examples-for-web-development\/","title":{"rendered":"Essential HTML Tags with Examples and Usage Rules"},"content":{"rendered":"<p>Basic HTML tags are easier to learn when grouped by what a page must communicate: document structure, text, lists, links, media and controls. The goal of this reference is to show a small valid sample of each group and explain when to use it. It is not a catalogue of old presentation tags that should be copied into a new site.<\/p>\n<h2>Document and text structure<\/h2>\n<pre><code class=\"language-html\">&lt;main&gt;\n  &lt;h1&gt;Exam preparation&lt;\/h1&gt;\n  &lt;p&gt;Start with the official learning objectives.&lt;\/p&gt;\n  &lt;h2&gt;Practice plan&lt;\/h2&gt;\n  &lt;p&gt;Review, test, and revisit weak areas.&lt;\/p&gt;\n&lt;\/main&gt;<\/code><\/pre>\n<p><code>main<\/code> names the primary content region. Headings communicate hierarchy; CSS controls visual size. Multiple unrelated headings at the same depth are not an improvement just because they add keywords.<\/p>\n<h2>Lists and description terms<\/h2>\n<pre><code class=\"language-html\">&lt;ul&gt;&lt;li&gt;Review objectives&lt;\/li&gt;&lt;li&gt;Practice labs&lt;\/li&gt;&lt;\/ul&gt;\n&lt;ol&gt;&lt;li&gt;Read&lt;\/li&gt;&lt;li&gt;Apply&lt;\/li&gt;&lt;li&gt;Test&lt;\/li&gt;&lt;\/ol&gt;\n&lt;dl&gt;&lt;dt&gt;API&lt;\/dt&gt;&lt;dd&gt;An interface contract.&lt;\/dd&gt;&lt;\/dl&gt;<\/code><\/pre>\n<p>Choose unordered, ordered or description-list markup based on the relationship among items. Do not use list elements solely to add indentation or spacing.<\/p>\n<h2>Links and images<\/h2>\n<pre><code class=\"language-html\">&lt;a href=\"\/blog\/\"&gt;Browse learning articles&lt;\/a&gt;\n&lt;img src=\"lab-diagram.png\" alt=\"Browser sends a request to the API server\"&gt;<\/code><\/pre>\n<p>Descriptive link text helps navigation. Alt text should convey the purpose of an informative image, not repeat a keyword list. Do not put arbitrary user-controlled strings into attribute values without appropriate escaping.<\/p>\n<h2>Tables represent data, not page layout<\/h2>\n<pre><code class=\"language-html\">&lt;table&gt;\n  &lt;caption&gt;Practice attempts&lt;\/caption&gt;\n  &lt;thead&gt;&lt;tr&gt;&lt;th scope=\"col\"&gt;Attempt&lt;\/th&gt;&lt;th scope=\"col\"&gt;Score&lt;\/th&gt;&lt;\/tr&gt;&lt;\/thead&gt;\n  &lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;\/td&gt;&lt;td&gt;72%&lt;\/td&gt;&lt;\/tr&gt;&lt;\/tbody&gt;\n&lt;\/table&gt;<\/code><\/pre>\n<p>Captions and header cells make tabular relationships easier to understand. For layout, use CSS grid or flexbox instead of nesting tables.<\/p>\n<h2>Forms need labels and correct buttons<\/h2>\n<pre><code class=\"language-html\">&lt;form&gt;\n  &lt;label for=\"email\"&gt;Email&lt;\/label&gt;\n  &lt;input id=\"email\" name=\"email\" type=\"email\" required&gt;\n  &lt;button type=\"submit\"&gt;Subscribe&lt;\/button&gt;\n&lt;\/form&gt;<\/code><\/pre>\n<p>Native controls support keyboard operation and basic validation; the server still must validate submitted values. A placeholder is not a persistent accessible name.<\/p>\n<h2>Text emphasis and code<\/h2>\n<p><code>strong<\/code> conveys importance and <code>em<\/code> conveys stress emphasis. <code>b<\/code> and <code>i<\/code> have different, non-emphasis uses. For code examples, use <code>pre<\/code> with <code>code<\/code> to preserve whitespace and protect literal angle brackets.<\/p>\n<h2>Void and obsolete elements<\/h2>\n<p><code>img<\/code>, <code>input<\/code>, <code>br<\/code> and <code>meta<\/code> are void elements; do not add closing tags to them. Avoid legacy font and center tags in new work; use semantic HTML with CSS for appearance. Consult the HTML living standard for exact content models and parsing rules.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Basic HTML tags are easier to learn when grouped by what a page must communicate: document structure, text, lists, links, media and controls. The goal of this reference is to show a small valid sample of each group and explain when to use it. It is not a catalogue of old presentation tags that should [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,14],"tags":[],"class_list":["post-194","post","type-post","status-publish","format-standard","hentry","category-post","category-software-development"],"_links":{"self":[{"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/posts\/194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/comments?post=194"}],"version-history":[{"count":3,"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/posts\/194\/revisions"}],"predecessor-version":[{"id":5949,"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/posts\/194\/revisions\/5949"}],"wp:attachment":[{"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/media?parent=194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/categories?post=194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/tags?post=194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}