<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tom Streeter</title>
    <description>The latest articles on DEV Community by Tom Streeter (@tomstreeter).</description>
    <link>https://dev.to/tomstreeter</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F367333%2F28781160-691b-4c77-b72f-2fa4ee16c0c3.jpeg</url>
      <title>DEV Community: Tom Streeter</title>
      <link>https://dev.to/tomstreeter</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tomstreeter"/>
    <language>en</language>
    <item>
      <title>HTML Markup: Tag, You're It</title>
      <dc:creator>Tom Streeter</dc:creator>
      <pubDate>Tue, 18 Aug 2020 18:07:25 +0000</pubDate>
      <link>https://dev.to/tomstreeter/html-markup-tag-you-re-it-4ph0</link>
      <guid>https://dev.to/tomstreeter/html-markup-tag-you-re-it-4ph0</guid>
      <description>&lt;h3&gt;
  
  
  Overview
&lt;/h3&gt;

&lt;p&gt;The element is the fundamental building block of an HTML document. The purpose of the HTML element is to provide &lt;strong&gt;&lt;em&gt;semantic meaning&lt;/em&gt;&lt;/strong&gt; to content of the page.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;headline&lt;/strong&gt; isn't a headline because of how big it is or its typeface. It's a headline because someone has decided that its &lt;em&gt;purpose&lt;/em&gt; on the page is to be a short introduction of what follows. Thus, the beginning and and end of the most important headline on a page is marked by opening and closing &lt;code&gt;&amp;lt;h1&amp;gt;...&amp;lt;/h1&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;paragraph&lt;/strong&gt; is a set of sentences that are somehow related. It may be &lt;em&gt;visually&lt;/em&gt; set apart using line-spacing or indentation, or even making the very first letter larger. Spacings or indentations have nothing to do with whether or not something is a paragraph, though. The formatting is only there to cognitively tip you off that &lt;em&gt;this&lt;/em&gt; group of sentences needs to be thought of as being interrelated somehow. A paragraph may be formatted, but formatting does not make something a paragraph. In HTML, what makes a paragraph a paragraph is the opening and closing &lt;code&gt;&amp;lt;p&amp;gt;...&amp;lt;/p&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Semantics&lt;/em&gt;&lt;/strong&gt; refers to how the &lt;strong&gt;&lt;em&gt;structure&lt;/em&gt;&lt;/strong&gt; of some thing can provide meaning beyond what the content of the thing itself literally says. HTML is used to define the structure of a document by delimiting its content with HTML elements in order to functionally label the various parts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Syntax
&lt;/h3&gt;

&lt;p&gt;Most HTML elements takes this general form:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;name attribute="value"&amp;gt;This is the element's content.&amp;lt;/name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Things to note:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Elements are delimited by two tags: the opening tag (e.g. &lt;code&gt;&amp;lt;name&amp;gt;&lt;/code&gt; ) and the closing tag (e.g. &lt;code&gt;&amp;lt;/name&amp;gt;&lt;/code&gt; ) . Closing tags contain a &lt;code&gt;/&lt;/code&gt; character followed by the name of the element being closed. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An open tag can contain more than one attribute, but it isn't required to have any. Some tags that don't have attributes with values serve no purpose, though. For example, an &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; (anchor) tag with no attributes is valid ... but kind of pointless.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Most attributes require a value be given, but there are rare exceptions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The closing tag &lt;em&gt;never&lt;/em&gt; contains attributes or values.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;element&lt;/strong&gt; is everything from the beginning of the open tag to the end of the closing tag. So saying "the blockquote element" means "everything from &lt;code&gt;&amp;lt;blockquote&amp;gt;&lt;/code&gt; to &lt;code&gt;&amp;lt;/blockquote&amp;gt;&lt;/code&gt; &lt;em&gt;including the words that come between them&lt;/em&gt;." Those words in-between the tags are the element's &lt;strong&gt;content&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Elements can contain other elements as content.  An element cannot start inside another element and then end outside it. It also cannot start outside another element and then end inside it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An element that contains another element is called a &lt;strong&gt;parent element&lt;/strong&gt;.  An element that's entirely inside another element is called a &lt;strong&gt;child element&lt;/strong&gt;.  An element that's both inside and outside of another element is called a &lt;strong&gt;mistake&lt;/strong&gt;. It's like your dog:  in or out, buddy.  Not both.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Whitespace generally doesn't matter in the element's content. Multiple spaces between words in the element's content are collapsed to a single space. Linefeeds and newlines are ignored entirely. There &lt;em&gt;is&lt;/em&gt; an element with the name &lt;code&gt;pre&lt;/code&gt; (&lt;code&gt;&amp;lt;pre&amp;gt; ... &amp;lt;/pre&amp;gt;&lt;/code&gt;) that preserves all whitespace and linefeeds in the content &lt;em&gt;as written&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Elements that are unknown to a browser are simply ignored without error. In this way they are much like students.  Don't understand something?  Ignore it and act as if it doesn't exist!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Not all values of attributes require quotation marks, but most do so they are properly interpreted by accessibility software. Since it is always OK to surround values with quotes, it is considered a best practice to just surround all values with quotes no matter what.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An attribute can have multiple values. Values may be separated by commas, semi-colons, or spaces depending on the attribute. &lt;em&gt;The delimiter you choose from memory will usually be wrong&lt;/em&gt;. Them's the rules.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While the vast majority of elements require both opening and closing tags, there are a few that don't require closing tags. These are formally referred to as &lt;strong&gt;replaced elements&lt;/strong&gt;. This means that that the tag will be replaced &lt;em&gt;entirely&lt;/em&gt; by content from outside the HTML document. Examples of this kind of element includes the &lt;code&gt;br&lt;/code&gt;, &lt;code&gt;hr&lt;/code&gt;, &lt;code&gt;img&lt;/code&gt;, &lt;code&gt;embed&lt;/code&gt;, &lt;code&gt;video&lt;/code&gt;, and &lt;code&gt;iframe&lt;/code&gt; elements. &lt;/p&gt;

&lt;p&gt;Replaced elements are &lt;em&gt;informally&lt;/em&gt; referred to as "self-closing" elements. Other self-closing elements can be found within the head element of an HTML document. These are not replaced elements since they aren't intended to be visible to the page's readers.&lt;/p&gt;

&lt;p&gt;Most replaced, or self-closing,  elements have multiple attributes. In the following &lt;code&gt;img&lt;/code&gt; element, there are two attributes, &lt;code&gt;src&lt;/code&gt; and &lt;code&gt;alt&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;img src="foo.png" alt="An image of a foo"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;src&lt;/code&gt; attribute takes a value that defines &lt;em&gt;where&lt;/em&gt; the source of the image may be found. It is written in the form of a &lt;strong&gt;URL&lt;/strong&gt; (Uniform Resource Locator) and may be either &lt;em&gt;absolute&lt;/em&gt; or &lt;em&gt;relative&lt;/em&gt; in &lt;em&gt;form&lt;/em&gt;. These concepts will be covered in more detail than you ever wanted in another post in this series.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;alt&lt;/code&gt; attribute's value is a textual label describing what the image depicts. This value may or may not be displayed by the browser if something prevents the image from being displayed.&lt;/p&gt;

&lt;p&gt;Since everything necessary to display the image is present in this tag and there is no need for content within the element itself, no closing tag is necessary. Any closing tag would simply be ignored because &lt;em&gt;that's what a browser always does when it doesn't understand something&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;A version of HTML called &lt;strong&gt;XHTML&lt;/strong&gt; required that replaced elements end with the characters &lt;code&gt;/&amp;gt;&lt;/code&gt; (e.g. &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;hr /&amp;gt;&lt;/code&gt;. The current &lt;strong&gt;HTML 5&lt;/strong&gt;  standard doesn't require this because it annoyed everyone. There are some among us who got used to doing it, so it's not considered wrong -- just unnecessary. Like Kardashians.&lt;/p&gt;

&lt;h3&gt;
  
  
  HTML Element Categories
&lt;/h3&gt;

&lt;p&gt;HTML elements can be categorized by the function they serve. The following is a list of the most important categories with links to a comprehensive list of the elements that comprise them. The list is found on the Mozilla Developer Network (&lt;a href="https://developer.mozilla.org"&gt;MDN&lt;/a&gt;)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Main_root"&gt;Main Root&lt;/a&gt;: The single  from which all others in an HTML document descend.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Document_metadata"&gt;Document Metadata&lt;/a&gt;: Elements that describe information &lt;em&gt;about&lt;/em&gt; a page, not the information that appears &lt;em&gt;on&lt;/em&gt; a page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Sectioning_root"&gt;Sectioning Root&lt;/a&gt;: The single element from which all visible content in an HTML document descends.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Content_sectioning"&gt;Content Sectioning&lt;/a&gt;: The elements that logically structure the overall HTML document.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Text_content"&gt;Text Content&lt;/a&gt;: Elements that define the semantic role of discrete content blocks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Inline_text_semantics"&gt;Inline Text Semantics&lt;/a&gt;: These semantic elements classify arbitrary chunks of text within a block.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Image_and_multimedia"&gt;Image and Multimedia&lt;/a&gt;: These are elements that embed images, audio, and video content within HTML pages&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Embedded_content"&gt;Embedded Content&lt;/a&gt;: Other types of non-HTML content that can be displayed within the context of a web page are marked with these elements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Scripting"&gt;Scripting&lt;/a&gt;: Elements that allow for including code that allows the user to interact with the page's content to perform tasks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Table_content"&gt;Table content&lt;/a&gt;: Elements that allows data to be organized in a tabular manner.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Forms"&gt;Forms&lt;/a&gt;: Elements that allow users to enter information to be processed by the web server through a variety of means.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Interactive_elements"&gt;Interactive elements&lt;/a&gt;: Elements used to create inteactive user interfaces.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Obsolete_and_deprecated_elements"&gt;Obsolete and Deprecated Elements&lt;/a&gt;: These are elements that should &lt;strong&gt;&lt;em&gt;not&lt;/em&gt;&lt;/strong&gt; be used. Ever.  Really.  Not ever. Even if you &lt;em&gt;really, really, really&lt;/em&gt; want to. Even if you found some code that uses it and it makes your page look the way you want it to.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;No one memorizes all of these elements. Some become familiar through repeated usage. All share some attributes, some have unique attributes. No one remembers them all. That's why there are online references like MDN. Lists like this can assist in determining where to find an element that fulfills a particular kind of role.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>html</category>
      <category>overview</category>
    </item>
    <item>
      <title>Semantics: Meaning from Markup</title>
      <dc:creator>Tom Streeter</dc:creator>
      <pubDate>Wed, 12 Aug 2020 17:20:29 +0000</pubDate>
      <link>https://dev.to/tomstreeter/semantics-meaning-from-markup-4819</link>
      <guid>https://dev.to/tomstreeter/semantics-meaning-from-markup-4819</guid>
      <description>&lt;h3&gt;
  
  
  The Power of Patterns
&lt;/h3&gt;

&lt;p&gt;Thinking is hard. It takes effort. It takes energy. It takes time. Many species have developed the ability to recognize patterns to minimize the effort required to accomplish tasks. What humans can do that many other species can't is extend this ability to abstract symbols.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NgQcm8vM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rtnov3fadj7xbu4dh7md.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NgQcm8vM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rtnov3fadj7xbu4dh7md.png" alt="A sentence that leaves letters out of each word but is still understandable" width="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This figure illustrates what recognizing patterns can do. We really don't need to read every letter in order to understand what's being communicated as long as we understand the patterns that words in our language typically employ. Your mind can "fill in the blanks" because it knows when vowels usually show up in words and you can insert letters "on the fly" to make reasonable guesses as to what the groups of letters mean. &lt;/p&gt;

&lt;p&gt;This can only work if you have an intuitive understanding of the language being used. Indeed, being able to identify that something is something based only on patterns you recognize isn't a bad working definition of the word "intuitive." When someone says they can read a language but can't speak it, that usually means they've begun to pick up the patterns.  It's not a small thing.&lt;/p&gt;

&lt;p&gt;You know that &lt;strong&gt;&lt;em&gt;HTML&lt;/em&gt;&lt;/strong&gt; stands for &lt;strong&gt;&lt;em&gt;Hyper Text Markup Language&lt;/em&gt;&lt;/strong&gt; and that individual HTML &lt;strong&gt;&lt;em&gt;elements&lt;/em&gt;&lt;/strong&gt; follow patterns we refer to as &lt;strong&gt;&lt;em&gt;syntax&lt;/em&gt;&lt;/strong&gt;. The syntax of HTML elements are so well-defined that your text editor will typically color-code their different parts so they're easier to understand at a glance.&lt;/p&gt;




&lt;h3&gt;
  
  
  Markup Provides Structure
&lt;/h3&gt;

&lt;p&gt;You also know that HTML elements can be grouped in particular ways to give HTML documents their overall structure. You can think about individual HTML elements as containers when they're used this way.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6JJexJ6P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/otbiz7dr2uqz4dto4i70.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6JJexJ6P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/otbiz7dr2uqz4dto4i70.png" alt="Very basic skeleton of a web page's markup" title="The structure of every web page ever." width="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the basic structure of every web page ever written. There's nothing accidental about it. Each element means &lt;em&gt;something&lt;/em&gt; to the browser.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt; element is the container within which the HTML document is held. The &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; element contains &lt;strong&gt;&lt;em&gt;meta&lt;/em&gt;&lt;/strong&gt; elements. These elements are not part of the page's &lt;em&gt;visible&lt;/em&gt; content, it's information about the page's content that only the browser needs to know. The &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; element is meta information. It's not part of the page's content. It's information &lt;em&gt;about&lt;/em&gt; the page that's there for the benefit of the web browser. Think of it this way: Some of my students would call me "Dr. Streeter." That's incorrect, as it turns out. I never finished my Ph.D., so it's really not appropriate to call me that. It's a &lt;em&gt;title&lt;/em&gt;; It's not my &lt;em&gt;name&lt;/em&gt;. It's an arbitrary &lt;strong&gt;&lt;em&gt;label&lt;/em&gt;&lt;/strong&gt; (albeit one that's hard to get and I didn't). The text of every HTML &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; element could legitimately be just &lt;code&gt;A Page&lt;/code&gt;. It'd be accurate, but not very helpful. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Don't do this.)&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Really.)&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;I don't know how the word &lt;em&gt;"title"&lt;/em&gt; was chosen. It would have been just as accurate to use the word &lt;em&gt;"label"&lt;/em&gt; or &lt;em&gt;"identity."&lt;/em&gt; It &lt;em&gt;is&lt;/em&gt; &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt;, though, but it's only a &lt;em&gt;"title"&lt;/em&gt; as far as the web browser is concerned.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; element, on the other hand, is the container for the content &lt;em&gt;meant to be seen by people&lt;/em&gt;. It's why the page exists. The &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; element contains a series of elements that are meant to be understood by web browsers. The stuff inside the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; element are read by computer programs called &lt;strong&gt;&lt;em&gt;web browsers&lt;/em&gt;&lt;/strong&gt; (or &lt;strong&gt;&lt;em&gt;User Agents&lt;/em&gt;&lt;/strong&gt; if you really want to show off) that are reading the HTML documents &lt;em&gt;for&lt;/em&gt; people. &lt;/p&gt;

&lt;p&gt;That last part is crucial. HTML is read by &lt;em&gt;machines&lt;/em&gt;, not people. &lt;em&gt;People&lt;/em&gt; are meant to see the &lt;em&gt;output&lt;/em&gt; of what a browser interprets from what's in the HTML document. &lt;/p&gt;

&lt;p&gt;The reason tools like &lt;a href="https://codepen.io"&gt;Codepen.io&lt;/a&gt; exist is that the &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; elements are really more boilerplate than anything else. Yes, they're important, but it's not the part of the web page we (as humans) spend the most time on (if we're doing it right). The part of the page we really care about is inside the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;. When you use a tool like Codepen, you're able to just work with HTML markup fragments &lt;em&gt;as if&lt;/em&gt; you were writing them in the body of a full HTML document -- but without having to actually write a whole document and stick it on a server somewhere. &lt;/p&gt;

&lt;p&gt;We want to be able to do that because the HTML elements that appear within the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; element take this idea of structuring content to a whole other level. To understand the importance of this, it's worth taking a little side trip to think about we really &lt;em&gt;use&lt;/em&gt; words.&lt;/p&gt;




&lt;h3&gt;
  
  
  Structure Provides Meaning
&lt;/h3&gt;

&lt;p&gt;Consider the following text:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ea efflorescere quo malis occaecat veniam exquisitaque instituendarum voluptate exquisitaque anim tempor quis fabulas dolor senserit relinqueret ne esse admodum singulis nam vidisse ab exercitation elit voluptatibus irure sunt familiaritatem o quae probant consectetur ullamco offendit voluptate ab eiusmod ita voluptate sempiternum exercitation do ea vidisse offendit adipisicing familiaritatem cupidatat multos hic quis adipisicing singulis laboris quid enim fugiat incurreret sint tractavissent deserunt admodum nisi deserunt comprehenderit est se iis tractavissent quamquam culpa tempor elit&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There is no way to know what this is. The words are a kind-of-sort-of-Latin called &lt;em&gt;lorem ipsum&lt;/em&gt; text that's commonly used as dummy text when mocking up all kinds of print and electronic documents.&lt;/p&gt;

&lt;p&gt;In this example there are no capital letters. There are no sentences. We don't know what's supposed to be what. Could be a cookie recipe.  Could be a ransom note &lt;em&gt;(has anyone seen my cat?)&lt;/em&gt; Since the words are essentially nonsense, the only way we're going to get any clue about what this is is from the structure of the words in relation to one another.&lt;/p&gt;

&lt;p&gt;Let's add capital letters and some punctuation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Ea efflorescere quo malis. Occaecat veniam exquisitaque instituendarum voluptate. Exquisitaque anim tempor quis, fabulas dolor senserit. Relinqueret ne esse admodum singulis nam vidisse ab exercitation elit voluptatibus. Irure sunt familiaritatem o quae probant consectetur ullamco offendit. Voluptate ab eiusmod ita voluptate sempiternum exercitation do ea vidisse offendit. Adipisicing familiaritatem cupidatat multos hic quis adipisicing singulis. Laboris quid enim fugiat incurreret sint tractavissent deserunt. Admodum nisi deserunt comprehenderit est. Se iis tractavissent quamquam culpa tempor elit.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Same letters and spaces, but now, at least, we can see what's supposed to be a sentence. Sure, the words still don't mean anything to us, but at least we can recognize a basic &lt;em&gt;structure&lt;/em&gt;. We know it's (probably) not just a list of words.&lt;/p&gt;

&lt;p&gt;Let's add a bit more structure:&lt;/p&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  Ea Efflorescere Quo Malis
&lt;/h4&gt;

&lt;p&gt;Occaecat veniam exquisitaque instituendarum voluptate. Exquisitaque anim tempor quis, fabulas dolor senserit. Relinqueret ne esse admodum singulis nam vidisse ab exercitation elit voluptatibus. Irure sunt familiaritatem o quae probant consectetur ullamco offendit.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;   Voluptate ab eiusmod ita voluptate sempiternum exercitation do ea vidisse offendit.&lt;/li&gt;
&lt;li&gt;   Adipisicing familiaritatem cupidatat multos hic quis adipisicing singulis.&lt;/li&gt;
&lt;li&gt;   Laboris quid enim fugiat incurreret sint tractavissent deserunt.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Admodum nisi deserunt comprehenderit est. Se iis tractavissent quamquam culpa tempor elit.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now we're getting somewhere! Without knowing a single thing about what any of the words mean, you might be able to make a reasonable guess as to what's going on. You won't be able to &lt;em&gt;translate&lt;/em&gt; it, but just the &lt;em&gt;form&lt;/em&gt; of the words communicate &lt;em&gt;something&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;What different interpretation would you make if you saw this instead?&lt;/p&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  Ea Efflorescere Quo Malis
&lt;/h4&gt;

&lt;p&gt;Occaecat veniam exquisitaque instituendarum voluptate. Exquisitaque anim tempor quis, fabulas dolor senserit. Relinqueret ne esse admodum singulis nam vidisse ab exercitation elit voluptatibus. Irure sunt familiaritatem o quae probant consectetur ullamco offendit.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;   Voluptate ab eiusmod ita voluptate sempiternum exercitation do ea vidisse offendit.&lt;/li&gt;
&lt;li&gt;   Adipisicing familiaritatem cupidatat multos hic quis adipisicing singulis.&lt;/li&gt;
&lt;li&gt;   Laboris quid enim fugiat incurreret sint tractavissent deserunt.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Admodum nisi deserunt comprehenderit est. Se iis tractavissent quamquam culpa tempor elit.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;See what changed? Why would you choose to use a numbered list instead of a bulleted list? Does your guess about what these words mean change because of the way the items are presented?&lt;/p&gt;




&lt;h3&gt;
  
  
  Semantics Are Meanings Communicated Through Structure Defined By Markup
&lt;/h3&gt;

&lt;p&gt;I hope you can see that the structure of the words -- the way they are arranged in relationship to one another -- suggests what the words themselves might &lt;em&gt;mean&lt;/em&gt;. We know &lt;em&gt;some&lt;/em&gt; structure has been imposed because the appearance of some of the words have changed in recognizable ways.&lt;/p&gt;

&lt;p&gt;How does HTML markup make this happen? Let's look at the markup and see:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h4&amp;gt;Ea efflorescere quo malis&amp;lt;/h4&amp;gt;

&amp;lt;p&amp;gt;Occaecat veniam exquisitaque instituendarum voluptate.
Exquisitaque anim tempor quis, fabulas dolor senserit. Relinqueret
ne esse admodum singulis nam vidisse ab exercitation elit
voluptatibus. Irure sunt familiaritatem o quae probant consectetur
ullamco offendit.&amp;lt;/p&amp;gt;

&amp;lt;ol&amp;gt;
    &amp;lt;li&amp;gt;  Voluptate ab eiusmod ita voluptate sempiternum
exercitation do ea vidisse offendit.&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt; Adipisicing familiaritatem cupidatat multos hic quis
adipisicing singulis.&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt; Laboris quid enim fugiat incurreret sint tractavissent
deserunt.&amp;lt;/li&amp;gt;
&amp;lt;/ol&amp;gt;

&amp;lt;p&amp;gt;Admodum nisi deserunt comprehenderit est. Se iis tractavissent
quamquam culpa tempor elit.&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Let's break down what we see — and don't see:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The first four words are a heading. In the context of this HTML page, this heading is a fourth-level heading. That means that somewhere else in this document, there are first, second, and third-level headings. The beginning and the ending of the heading are marked by the &lt;code&gt;&amp;lt;h4&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/h4&amp;gt;&lt;/code&gt; tags. It says &lt;strong&gt;&lt;em&gt;nothing&lt;/em&gt;&lt;/strong&gt; about what a fourth-level heading should &lt;em&gt;look&lt;/em&gt; like. CSS dictates that, not the HTML.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There is a block of text surrounded by the elements &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/p&amp;gt;&lt;/code&gt; that sets it off as a paragraph. It's literally the use of those tags that means the content should be &lt;em&gt;considered&lt;/em&gt; a paragraph. In this case paragraphs happen to have an extra line before and after them and no indentation of the first line. That's only because the CSS is set up that way. All the HTML does is say "this is a paragraph." If the CSS defined indentations and no extra lines, the same markup would work just as well.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Three sentences form a list in which their order matters. We know the order matters because they're displayed in numerical order, but those numbers could just as easily be letters, roman numerals, or even spelled out as words. The &lt;code&gt;&amp;lt;ol&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/ol&amp;gt;&lt;/code&gt; group the items on that list. Individual list items are defined by &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/li&amp;gt;&lt;/code&gt; tags. If the order of the sentences didn't matter, bullet points would be more appropriate and unordered list (&lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; and &amp;lt;&lt;code&gt;/ul&amp;gt;&lt;/code&gt;) tags would be used. &lt;/p&gt;

&lt;p&gt;List items must be surrounded by either ordered list tags or unordered list tags so the item "knows" what kind of marker to add. If you knew nothing about HTML you'd never know that this was a numbered list. And it doesn't have to be numbered as I pointed out in the description. "Ordered" and "unordered" is all the HTML defines. How those concepts manifest themselves are up to CSS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The last two sentences are marked off as a final paragraph with our old pals  &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/p&amp;gt;&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PZ8BBZ0D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/j2bsbnrdnshlop7uw6mg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PZ8BBZ0D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/j2bsbnrdnshlop7uw6mg.png" alt="Screenshot of the entire webpage this post is based on"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Documents can have further internal structures that aren't necessarily visible to the eye, but still have meanings that matter. The figure above is the structure of the web page where the text of this blog post originated. See where there's a &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt; element with an &lt;code&gt;id&lt;/code&gt; attribute with the value &lt;code&gt;semantics&lt;/code&gt;? That could just as easily say &lt;code&gt;"You are Here."&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Except that would be stupid.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Which doesn't mean I wouldn't do it.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;&lt;em&gt;It just means I didn't think of it before I grabbed the screenshot.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Look at all those other tags. Now look at the page you're reading. &lt;/p&gt;

&lt;p&gt;You should be able to find that level-3 heading since it's up there at the top of the page. What about the rest of them? What does a &lt;code&gt;&amp;lt;header&amp;gt;&lt;/code&gt; look like? What about a &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt;? What the heck is a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; and why would it have an &lt;code&gt;id&lt;/code&gt; with a value of &lt;code&gt;"wrapper"&lt;/code&gt;? What's the deal with all those &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt;s?&lt;/p&gt;

&lt;p&gt;Many of those tags have names that are descriptive of what kind of region they are meant to define. They &lt;em&gt;mean&lt;/em&gt; something. When &lt;strong&gt;&lt;em&gt;content&lt;/em&gt;&lt;/strong&gt; is ascribed particular &lt;strong&gt;&lt;em&gt;meaning&lt;/em&gt;&lt;/strong&gt; through the use of particular &lt;em&gt;&lt;em&gt;markup&lt;/em&gt;&lt;/em&gt; tags, it's referred to as &lt;strong&gt;&lt;em&gt;semantic&lt;/em&gt;&lt;/strong&gt;  markup. &lt;/p&gt;

&lt;p&gt;Semantic markup provides meaning. It doesn't define appearance. &lt;/p&gt;

&lt;p&gt;Understanding this is what separates people who understand what they are doing when they markup a document from people who just cut-and-paste tags on a page and hope they work.&lt;/p&gt;

&lt;p&gt;If you want to know specifically what those tags you see mean, you can &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/HTML"&gt;look them up&lt;/a&gt;. The main takeaway from this post is that the purpose of HTML is to define a &lt;em&gt;meaningful structure&lt;/em&gt; to a document. Sometimes those meanings will result in special formatting, but it's not always the case. &lt;/p&gt;

&lt;p&gt;When you learn about a particular element's tag, don't think about it in terms of what it makes something &lt;em&gt;look&lt;/em&gt; like. Think about it in terms of what it says something &lt;em&gt;means&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;That's the essence of semantic markup with HTML. Understand that and you'll understand HTML in a pretty deep way.&lt;/p&gt;

</description>
      <category>html</category>
      <category>semantics</category>
      <category>beginners</category>
    </item>
    <item>
      <title>An Introduction to Things My Students Never Read</title>
      <dc:creator>Tom Streeter</dc:creator>
      <pubDate>Wed, 12 Aug 2020 01:58:56 +0000</pubDate>
      <link>https://dev.to/tomstreeter/an-introduction-to-things-my-students-never-read-neg</link>
      <guid>https://dev.to/tomstreeter/an-introduction-to-things-my-students-never-read-neg</guid>
      <description>&lt;p&gt;There's an old joke among teachers that if you want to hide something from a student, stick it in a textbook. The 18 years I spent teaching at various colleges and the other 12 spent in the corporate training world have only convinced me to extend it to handouts, slide decks, most sentences not ending with "... and this will be on the quiz."&lt;/p&gt;

&lt;p&gt;The flip side of that is that there are few places less conducive to learning something than a college classroom or a corporate training room. The only things you can guarantee are that everyone had trouble finding a parking spot, no one really wants to be there at that &lt;em&gt;particular&lt;/em&gt; moment, and a significant portion of the class &lt;em&gt;really&lt;/em&gt; needs to go to the bathroom.&lt;/p&gt;

&lt;p&gt;I loved teaching and can honestly say the best part of the gig was the students. I still hear from many and I'm thrilled when I do. Students today have it far tougher than I did when I was an undergrad back in the early 1980s. I've never had time or patience for the "kids today are soft" stuff. Nowadays I tell people that I'm a freelance web developer when I have to be serious and when I don't I tell them I'm a professional cautionary tale. A lot of the work I do is related to the beer business somehow .&lt;/p&gt;

&lt;p&gt;I really enjoy reading the tutorials published here. Even when it's a topic I'm familiar with I like to see how other brains make sense of them. The other day I came across a directory that held the website I used as a supplement for my last semester teaching basic web development.  As I read through a couple of the pages I thought  maybe ought to see the light of day again. The last university I taught at still hasn't killed the site, but it's really just a matter of time. My class was intended for students who weren't majoring in an IT-related field, so these are pieces that assume zero prior knowledge. I've never posted here before, so this seems like a good way to start.&lt;/p&gt;

&lt;p&gt;So here's the plan:  I'm going to take a two or three of the pages I wrote for my class and convert them to blog posts and post them here. There will be a little editing just to make examples less specific to the university I was at and just generally tighten things up (because there are no finished blog posts, only current drafts). Eventually they'll also make their way onto my personal site, but I haven't gotten around to really building that out yet (professional cautionary tale, remember?). If there's any interest when I've worked through the stuff I'm revising, I'm open to requests. &lt;/p&gt;

&lt;p&gt;The first piece is going to deal with what is meant by "semantic HTML."  Stay tuned.&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>beginners</category>
      <category>introduction</category>
    </item>
  </channel>
</rss>
