{"id":3720,"date":"2023-07-18T00:42:24","date_gmt":"2023-07-18T00:42:24","guid":{"rendered":"https:\/\/nmi.cool\/advweb\/?page_id=3720"},"modified":"2024-08-04T01:46:52","modified_gmt":"2024-08-04T01:46:52","slug":"course-notes-more-html","status":"publish","type":"page","link":"https:\/\/nmi.cool\/advweb\/unit-one-html-css\/week-one\/course-notes-more-html\/","title":{"rendered":"Course Notes: More HTML"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">DOCUMENT &amp; WEBSITE STRUCTURE<\/h2>\n\n\n\n<p>Your documents different sections should be marked up according to their content and their functionality<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>&lt;nav&gt;<\/code>\u00a0&#8211; navigation bar, main navigation functionality for the page<\/li>\n\n\n\n<li><code>&lt;header&gt;<\/code>\u00a0&#8211; introductory content<\/li>\n\n\n\n<li><code>&lt;footer&gt;<\/code>\u00a0\u00a0&#8211; group of end content for a page<\/li>\n\n\n\n<li><code>&lt;main&gt;<\/code>\u00a0&#8211; main content: \u00a0content that\u2019s unique to this page, use only once per page, has many subsections that can be used inside:\n<ul class=\"wp-block-list\">\n<li><code>&lt;article&gt;<\/code>&nbsp;block of related content, stands on its own<\/li>\n\n\n\n<li><code>&lt;section&gt;<\/code>&nbsp;grouping together a part of a page that constitutes a single piece of functionality<\/li>\n\n\n\n<li><code>&lt;aside&gt;<\/code>&nbsp;sidebar: content that\u2019s not directly related to the main content but can provide additional indirect information<\/li>\n\n\n\n<li><em>non-sematic subsections<\/em>&nbsp;(only use if you can\u2019t think of a better semantic text element)<\/li>\n\n\n\n<li><code>&lt;span&gt;<\/code>&nbsp;inline element<\/li>\n\n\n\n<li><code>&lt;div&gt;<\/code>&nbsp;block element, container<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p><strong>SEO (Search Engine Optimization)<\/strong>: a page\u2019s search ranking can be affected by the use and content of certain tags including &lt;br&gt; and &lt;hr&gt; tags. These tags control readability of a site, which plays a part in SEO. More information on SEO will be included in Module 4. <\/p>\n\n\n\n<p><code>&lt;br&gt;<\/code>&nbsp;line break: creates a line break, moving the following content down a line<\/p>\n\n\n\n<p><code>&lt;hr&gt;<\/code>\u00a0horizontal rule: creates a horizontal line between two elements, denotes a thematic change in the text<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FORMS<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>FORMS FUNDAMENTALS\n<ul class=\"wp-block-list\">\n<li><code><strong>&lt;form&gt;<\/strong><\/code>\u00a0&#8211; container element for the form<\/li>\n\n\n\n<li><code><strong>action=\"www.url.com\"<\/strong><\/code>\u00a0&#8211; defines the location (URL) where the form information goes once submitted<\/li>\n\n\n\n<li><code><strong>method=\"get, post\"<\/strong><\/code>\u00a0&#8211; defines which HTTP method to send the data with\n<ul class=\"wp-block-list\">\n<li><code>\u201cpost\u201d<\/code>&nbsp;appends form-data inside the body of the HTTP request, has no size limitations, are never cached, cannot be bookmarked<\/li>\n\n\n\n<li><code>\u201cget\u201d<\/code>\u00a0appends form-date into the URL in name\/value pairs, never use to send sensitive data, better for non-secure data, length restrictions, can be cached, can be bookmarked<\/li>\n\n\n\n<li><strong>Labels<\/strong> &#8211; how to link a label to a form widget by referencing the widget\u2019s id. Allows users to click on the label to activate the corresponding widget<br><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>INPUT&nbsp;<code>&lt;input type=\u201cemail, text, password\"&gt;<\/code>\n<ul class=\"wp-block-list\">\n<li>Text input: basic single-line text field, accepts any kind of text input.<\/li>\n\n\n\n<li>Email input: single-line text field, only accepts email addresses.<\/li>\n\n\n\n<li>Password input: single-line text field<\/li>\n\n\n\n<li>Search input: similar to text field but is usually rendered with different style and values can be saved to autofill across multiple pages<\/li>\n\n\n\n<li><code>&lt;textarea&gt;<\/code>&nbsp;text box larger than 1 line, different from normal text input because it can be adjusted to be larger and instead of using a value attribute, the text between the opening and closing tags is the default value\n<ul class=\"wp-block-list\">\n<li>cols attribute= width of the text control<\/li>\n\n\n\n<li>rows attribute= # of text lines<\/li>\n\n\n\n<li>wrap attribute= (hard\/soft) indicates how the control wraps text<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>&lt;fieldset&gt;<\/code>&nbsp;element: way to group widgets that share the same purpose, styling and semantic purposes<\/li>\n\n\n\n<li><code>&lt;legend&gt;<\/code>&nbsp;element: formally describes the purpose of the&nbsp;<code>&lt;fieldset&gt;<\/code>&nbsp;and acts as a label, inside of the&nbsp;<code>&lt;fieldset&gt;<\/code>&nbsp;element<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>FORM ATTRIBUTES\n<ul class=\"wp-block-list\">\n<li>Autofocus: specification to the element that should automatically have input focus when the page loads<\/li>\n\n\n\n<li>Disabled: prevents the user from interacting with the element<\/li>\n\n\n\n<li>Required: required fields are followed by&nbsp;<code>&lt;abbr title=\"required\"&gt;*&lt;\/abbr&gt;<\/code>&nbsp;so that the user sees the star character (*) and knows it\u2019s required, cannot be submitted without being completed<\/li>\n\n\n\n<li>Name: name of the element, submitted with the form data<\/li>\n\n\n\n<li>Values: the element\u2019s initial value<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>DROPDOWN CONTENT\n<ul class=\"wp-block-list\">\n<li>Autocomplete: suggested, automatically-completed values<\/li>\n\n\n\n<li>Checkable Items: check box &amp; radio buttons, values only sent only if they are checked<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>ADVANCED FORM WIDGETS\n<ul class=\"wp-block-list\">\n<li>Placeholder: this is the text that appears inside the text input box before something is entered by the user<\/li>\n\n\n\n<li>Sliders: a way to pick a number by using a slider, used when the exact valie isn\u2019t necessarily important,&nbsp;<code>&lt;input type=\u201drange\u201d min=\u201d0\u201d max=\u201d500\u201d&gt;<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>DATE &amp; TIME PICKER\n<ul class=\"wp-block-list\">\n<li>Created using the&nbsp;<code>&lt;input&gt;<\/code>&nbsp;element<\/li>\n\n\n\n<li>Specify using the&nbsp;<code>type=<\/code>&nbsp;attribute\n<ol class=\"wp-block-list\">\n<li><code>\u201cdatetime-local\u201d<\/code>&nbsp;widget that displays a date with time (no time zone info)<\/li>\n\n\n\n<li><code>\u201cmonth\u201d<\/code>&nbsp;widget that displays a month with a year<\/li>\n\n\n\n<li><code>\u201ctime\"<\/code>&nbsp;widget that displays an hours and minute, optionally seconds<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>COLOR PICKERS\n<ul class=\"wp-block-list\">\n<li>Created using the &lt;input&gt; element<\/li>\n\n\n\n<li>Set the type attribute to \u201dcolor\u201d<\/li>\n\n\n\n<li>Warning! color widget support is currently not good.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>FILE PICKER\n<ul class=\"wp-block-list\">\n<li>Widget that allows the user to choose 1+ files to send<\/li>\n\n\n\n<li>Create using the&nbsp;<code>&lt;input&gt;<\/code>&nbsp;element<\/li>\n\n\n\n<li>Specify its type attribute set to \u201cfile\u201d<\/li>\n\n\n\n<li>Accept attribute constrains the types of files that are accepted\n<ol class=\"wp-block-list\">\n<li><code>\u201cimage\/*\u201d<\/code>&nbsp;for images<\/li>\n\n\n\n<li><code>\u201cfile\/*<\/code>&nbsp;for doc files<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>including the multiple attribute allows the user to pick more than one file<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"9\">\n<li>HIDDEN CONTENT\n<ul class=\"wp-block-list\">\n<li>convenient for technical reasons to have pieces of data that are sent with a form but not displayed to the user<\/li>\n\n\n\n<li>create using the&nbsp;<code>&lt;input&gt;<\/code>&nbsp;element<\/li>\n\n\n\n<li>specify its type attribute to \u201chidden\u201d<\/li>\n\n\n\n<li>required to set it\u2019s name and value attributes, ex:&nbsp;<code>name=\"timestamp\u201d value=\u201dthe hidden data you want to include when the form\u2019s submitted\u201d<\/code><\/li>\n\n\n\n<li>Note: do not rely on hidden inputs as a form of security, the page\u2019s content is still visible using the browser\u2019s developer tools<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>IMAGE BUTTON\n<ul class=\"wp-block-list\">\n<li>an image where when the user clicks on it, it behaves like a submit button<\/li>\n\n\n\n<li>created using the&nbsp;<code>&lt;input&gt;<\/code>&nbsp;element<\/li>\n\n\n\n<li>specify its type attribute to&nbsp;<code>type=\u201cimage\u201d<\/code><\/li>\n\n\n\n<li>If the image is used to submit the form, it submits the x &amp; y coordinates of the click relative to the image<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>DOCUMENT &amp; WEBSITE STRUCTURE Your documents different sections should be marked up according to their content and their functionality SEO (Search Engine Optimization): a page\u2019s search ranking can be affected by the use and content of certain tags including &lt;br&gt; and &lt;hr&gt; tags. These tags control readability of a site, which plays a part in &hellip; <a href=\"https:\/\/nmi.cool\/advweb\/unit-one-html-css\/week-one\/course-notes-more-html\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Course Notes: More HTML<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3682,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3720","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/nmi.cool\/advweb\/wp-json\/wp\/v2\/pages\/3720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nmi.cool\/advweb\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/nmi.cool\/advweb\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/nmi.cool\/advweb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nmi.cool\/advweb\/wp-json\/wp\/v2\/comments?post=3720"}],"version-history":[{"count":8,"href":"https:\/\/nmi.cool\/advweb\/wp-json\/wp\/v2\/pages\/3720\/revisions"}],"predecessor-version":[{"id":4074,"href":"https:\/\/nmi.cool\/advweb\/wp-json\/wp\/v2\/pages\/3720\/revisions\/4074"}],"up":[{"embeddable":true,"href":"https:\/\/nmi.cool\/advweb\/wp-json\/wp\/v2\/pages\/3682"}],"wp:attachment":[{"href":"https:\/\/nmi.cool\/advweb\/wp-json\/wp\/v2\/media?parent=3720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}