{"id":19,"date":"2019-04-05T16:55:29","date_gmt":"2019-04-05T16:55:29","guid":{"rendered":"https:\/\/openlab.bmcc.cuny.edu\/mmp460\/?page_id=19"},"modified":"2021-03-08T18:16:16","modified_gmt":"2021-03-08T18:16:16","slug":"html-css","status":"publish","type":"page","link":"https:\/\/openlab.bmcc.cuny.edu\/mmp460-1100\/html-css\/","title":{"rendered":"HTML\/CSS"},"content":{"rendered":"\n<p id=\"top\">HTML: <a href=\"#What-is-HTML\" data-type=\"URL\">What is HTML?<\/a> | <a href=\"#Element-Tags-and-Attributes\">Element, Tags, and Attributes<\/a>|<a href=\"#Empty-and-container-elements\"> Empty and container elements <\/a> | <a href=\"#nesting-parents-children-and-inheritance\">Nesting, Parents, Children and Inheritance<\/a> | <a href=\"#html5-sectional-elements\">HTML5 Sectional Elements<\/a> | <a href=\"#formatting-text-in-html\">Formatting Text in HTML<\/a> | <a href=\"#Basic-HTML-structure\">Basic HTML Structure<\/a><\/p>\n\n\n\n<p>CSS: <a href=\"#What-is-CSS\">What is CSS?<\/a> | <a href=\"#Types-of-CSS\">Types of CSS<\/a> | <a href=\"#How-to-write-CSS\">How to Write CSS?<\/a> | <a href=\"#CSS-Selectors\">CSS selectors<\/a> | <a href=\"#CSS-box-model\">CSS box model<\/a> | <a href=\"#Width-Max-Width\">Width &amp; Max-Width<\/a> | <a href=\"#Block-level-and-Inline-elements\">Block-level and Inline elements<\/a> | <a href=\"#CSS-type-properties\">CSS type properties<\/a> | <a href=\"http:\/\/Using an Online Font Service\">Using an Online Font Service (Google Fonts)<\/a> | <a href=\"#Viewport-and-Media-Queries\">Viewport &amp; Media Queries<\/a> <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Intro-htmlcss\">Introduction<\/h2>\n\n\n\n<p>Front-end web development is comprised of two main coding languages: HTML and CSS (with some added Javascript in many instances). They are markup (not &#8220;programming&#8221;) languages, that are used to display and organize information on the web.<\/p>\n\n\n\n<hr class=\"wp-block-separator\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">HTML<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"What-is-HTML\">What is HTML? <\/h3>\n\n\n\n<p>HTML (Hypertext Markup Language) is a set of instructions to a browser about what information to include in a web page (text, hyperlinks, but also images, sound, and other media). It provides structure and organization for the layout of the page.<\/p>\n\n\n\n<p class=\"has-text-align-right has-medium-gray-color has-text-color\"><em><a href=\"#top\">go back to top<\/a><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Element-Tags-and-Attributes\">Element, Tags, and Attributes<\/h3>\n\n\n\n<p><strong>HTML tags<\/strong>&nbsp;mark the content of the page. For example &lt;p&gt; marks content as a paragraph and &lt;header&gt; marks the head portion of a page or an element.<\/p>\n\n\n\n<p>Most tags come in pairs. The first opens an&nbsp;<em>HTML element<\/em>&nbsp;and the second closes it. The line below is an example of an&nbsp;<em>HTML element<\/em>&nbsp;which includes the start and end tags, as well as the content.:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;p&gt;This is a great day&lt;\/p&gt;\n<\/pre><\/div>\n\n\n\n<p>This is another html element that in which a paragraph is&nbsp;<em>nested<\/em>&nbsp;inside a div element:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;div&gt;&lt;p&gt;This is a great day&lt;\/p&gt;&lt;\/div&gt;\n<\/pre><\/div>\n\n\n\n<p>An&nbsp;<strong>attribute<\/strong>&nbsp;is a property of an element. It is written inside the start tag in the following form:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;tag attribute=&quot;value&quot;&gt;\n<\/pre><\/div>\n\n\n\n<p>For example the src attribute points to a file\u2019s name and location, in the form of a URL:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;img src=&quot;images\/flower.gif&quot; \/&gt;<\/pre><\/div>\n\n\n\n<p class=\"has-text-align-right\"><em><a href=\"#top\">go back to top<\/a><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Empty-and-container-elements\">Empty and container elements<\/h3>\n\n\n\n<p>Tags that enclosed content are called&nbsp;<strong>Container Elements<\/strong>. They consist of opening and closing tags and all content is placed between them. For example:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">  &lt;p&gt;content&lt;\/p&gt;\n  &lt;h1&gt;content&lt;\/h1&gt;\n<\/pre><\/div>\n\n\n\n<p>Tags that do not enclosed content are called&nbsp;<strong>Empty Elements<\/strong>. They do not have a closing tag. Instead, in XHTML they are closed with a \/, for example. Here is a list of Empty Elements:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">  &lt;br&gt;\n  &lt;link&gt;\n  &lt;img&gt;\n  &lt;hr&gt;\n  &lt;meta&gt;\n  &lt;embed&gt;\n  &lt;param&gt;\n  &lt;area&gt;\n  &lt;col&gt;\n  &lt;input&gt;<\/pre><\/div>\n\n\n\n<p class=\"has-text-align-right\"><em><a href=\"#top\">go back to top<\/a><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"nesting-parents-children-and-inheritance\">Nesting, Parents, Children and Inheritance<\/h3>\n\n\n\n<p>When an HTML element is \u2018nested\u2019 inside another element, such as in the code below, it is considered a child of the nesting element.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">&lt;div&gt;\n &lt;p&gt;lorem ipsum&lt;\/p&gt;\n&lt;\/div&gt;\n<\/pre><\/div>\n\n\n\n<p>Note that the closing tag of the child element appears before the closing tag of parent, so it is fully contained within the parent element.<\/p>\n\n\n\n<p>You may have several layers of nesting, such as:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">&lt;body&gt;\n &lt;header&gt;\n  &lt;div&gt;\n   &lt;h1&gt;\n    &lt;a href=&quot;#&quot;&gt;lorem ipsum&lt;\/a&gt;\n   &lt;\/h1&gt;\n  &lt;\/div&gt;\n &lt;\/header&gt;\n&lt;\/body&gt;\n<\/pre><\/div>\n\n\n\n<p>Child elements inherit some CSS styles from their parents. For example, the&nbsp;<em>font<\/em>&nbsp;property is inheritable, as well as the&nbsp;<em>text-align<\/em>&nbsp;and the&nbsp;<em>width<\/em>&nbsp;properties. Some properties are not inheritable such as the&nbsp;<em>background-color<\/em>&nbsp;property.<\/p>\n\n\n\n<p class=\"has-text-align-right\"><em><a href=\"#top\">go back to top<\/a><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"html5-sectional-elements\">HTML5 Sectional Elements<\/h3>\n\n\n\n<p><em>The following definitions are all from&nbsp;<a href=\"https:\/\/html.spec.whatwg.org\/\">HTML \u2013 Living Standard<\/a>:<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The&nbsp;<strong>body<\/strong>&nbsp;element: The body element represents the main content of the document.<\/li><li>The&nbsp;<strong>header<\/strong>&nbsp;element: The header element represents a group of introductory or navigational aids.<\/li><li>The&nbsp;<strong>h1, h2, h3, h4, h<\/strong>5, and&nbsp;<strong>h6<\/strong>&nbsp;elements: These elements represent headings for their sections. These elements have a rank given by the number in their name. The h1 element is said to have the highest rank, the h6 element has the lowest rank, and two elements with the same name have equal rank.<\/li><li>The&nbsp;<strong>nav<\/strong>&nbsp;element: The nav element represents a section of a page that links to other pages or to parts within the page: a section with navigation links.<\/li><li>The&nbsp;<strong>section<\/strong>&nbsp;element: The section element represents a generic section of a document or application. A section, in this context, is a thematic grouping of content, typically with a heading.<\/li><li>The&nbsp;<strong>article<\/strong>&nbsp;element: The article element represents a self-contained composition in a document, page, application, or site and that is, in principle, independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content.<\/li><li>The&nbsp;<strong>aside<\/strong>&nbsp;element: The aside element represents a section of a page that consists of content that is tangentially related to the content around the aside element, and which could be considered separate from that content. Such sections are often represented as sidebars in printed typography.It can be used for typographical effects like pull quotes or sidebars, for advertising, for groups of nav elements, and for other content that is considered separate from the main content of the page.<\/li><li>The&nbsp;<strong>footer<\/strong>&nbsp;element: The footer element represents a footer for its nearest ancestor sectioning content or sectioning root element. A footer typically contains information about its section such as who wrote it, links to related documents, copyright data, and the like.<\/li><li>The&nbsp;<strong>address<\/strong>&nbsp;element: The address element represents the contact information for its nearest article or body element ancestor. If that is the body element, then the contact information applies to the document as a whole.<\/li><\/ul>\n\n\n\n<p><em><a href=\"#top\">go back to top<\/a><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"formatting-text-in-html\">Formatting Text in HTML<\/h3>\n\n\n\n<p>The following are the most commonly used HTML elements to format text.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">p &#8211; paragraph text<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;p&gt;So she was considering in her own mind (as well as she could, for the\n    day made her feel very sleepy and stupid), whether the pleasure of\n    making a daisy-chain would be worth the trouble of getting up and\n    picking the daisies, when suddenly a White Rabbit with pink eyes ran\n    close by her. &lt;\/p&gt;\n<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">h1\u2026.h6 &#8211; titles<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;h1&gt;Alice's Adventures in Wonderland&lt;\/h1&gt;\n    &lt;h2&gt;Down the Rabbit-Hole&lt;\/h2&gt;\n<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">ul, li &#8211; unordered list (bullet list)<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;ul&gt;\n            &lt;li&gt;Alice&lt;\/li&gt;\n            &lt;li&gt;White rabbit&lt;\/li&gt;\n            &lt;li&gt;Caterpillar&lt;\/li&gt;\n            &lt;li&gt;Queen&lt;\/li&gt;\n     &lt;ul&gt;\n<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">ol, li &#8211; ordered list (number list)<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">     &lt;ol&gt;\n            &lt;li&gt;Down the Rabbit-Hole&lt;\/li&gt;\n            &lt;li&gt;The Pool Of Tears&lt;\/li&gt;\n            &lt;li&gt;A Caucus-Race And A Long Tale&lt;\/li&gt;\n            &lt;li&gt;The Rabbit Sends In A Little Bill&lt;\/li&gt;\n     &lt;ol&gt;\n<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"elements-to-mark-emphasis-or-set-text-apart\">Elements to Mark Emphasis or Set Text Apart<\/h4>\n\n\n\n<p>The&nbsp;<strong>strong<\/strong>&nbsp;element is used to indicate text that is more important than the rest of the text.&nbsp;<a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-strong-element\">More<\/a>.<\/p>\n\n\n\n<p>The&nbsp;<strong>em<\/strong>&nbsp;element is used for stress emphasis. It does not indicate importance but alters the meaning of the sentence.&nbsp;<a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-em-element\">More<\/a>.<\/p>\n\n\n\n<p>The&nbsp;<strong>b<\/strong>&nbsp;element is used to offset part of the text for stylistic purposes, such as when we want to give it a different visual treatment. It does not convey importance or meaning.&nbsp;<a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-b-element\">More<\/a>.<\/p>\n\n\n\n<p>The&nbsp;<strong>i<\/strong>&nbsp;element: used to indicate a different, voice, language or moood from the rest of the text.&nbsp;<a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-i-element\">More<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"quoting-with-the-blockquote-and-q-elements\">Quoting with the blockquote and q elements<\/h4>\n\n\n\n<p><strong>The blockquote element<\/strong><\/p>\n\n\n\n<p>Use blockquote tags to quote a sentence or a passage. You can nest any other HTML tag inside it. For example:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;blockquote&gt;\n      &lt;p&gt;The reports of my death have been greatly exaggerated.&lt;\/p&gt;\n      &lt;footer&gt;-- Mark Twain&lt;\/footer&gt;\n    &lt;\/blockquote&gt;\n<\/pre><\/div>\n\n\n\n<p>Note that the source of the quote, which is not part of the quote but tells us something about it, is appropriately inside a footer.<\/p>\n\n\n\n<p><strong>The q element<\/strong><\/p>\n\n\n\n<p>Use the q tags to insert a quote into a sentence or a paragraph, such as in:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;p&gt;&lt;q&gt; Curiouser and curiouser!&lt;\/q&gt; cried Alice&lt;\/p&gt;\n<\/pre><\/div>\n\n\n\n<p><strong>The cite attribute<\/strong><\/p>\n\n\n\n<p>The cite attribute can be used for both blockquote and q elements to indicate a source. The cite value must be a url. For example:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;blockquote cite=&quot;http:\/\/www.yourquotesource\/source.html&quot;&gt;<\/pre><\/div>\n\n\n\n<p class=\"has-text-align-right\"><em><a href=\"#top\">go back to top<\/a><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Basic-HTML-structure\">Basic HTML structure<\/h3>\n\n\n\n<p>Every HTML page should follow this basic structure: <\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">&lt;!DOCTYPE html&gt;\n&lt;html lang=&quot;en&quot;&gt;\n\t&lt;head&gt;\n\t\t&lt;meta charset=&quot;utf-8&quot;&gt;\n\t\t&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;\n  \t\t&lt;title&gt;Web Page Title&lt;\/title&gt;\n\t\t&lt;link rel=&quot;stylesheet&quot; href=&quot;css\/style.css&quot;&gt;\n  \t&lt;\/head&gt;\n\t&lt;body&gt;\n\t&lt;\/body&gt;\n&lt;\/html&gt;<\/pre><\/div>\n\n\n\n<p>Nothing would be displayed on this page as the <code>&lt;body&gt;<\/code> element is empty, but it has all the required tags to get started: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The <code>&lt;!DOCTYPE html&gt; <\/code>declaration lets the browser know which type of document to expect (in this case an html file).<\/li><li>The <code>&lt;html lang&gt;<\/code> attribute specifies the language of the element&#8217;s content (in this case English)<\/li><li>The <code>&lt;head&gt;<\/code> element is a container for metadata (data about data). It&#8217;s content is not displayed in the browser window.<\/li><li><code>&lt;meta charset&gt;<\/code> is used to specify the character encoding for the HTML document<\/li><li><code>&lt;meta name = \"viewport\"&gt;<\/code> is used to create responsive web pages (which adjust based on screen size)<\/li><li>The <code>&lt;title&gt; <\/code>specifies the title of a web page. It is displayed on search engine results pages as the clickable headline for a given result. It should be an accurate and concise description of a page&#8217;s content.<\/li><li><code>&lt;link rel=\"stylesheet\"&gt; <\/code>contains the path to the CSS sheet used to style the page<\/li><li>The <code>&lt;body&gt;<\/code> contains all the contents of an HTML document, such as headings, paragraphs, images, hyperlinks, tables, lists, etc. There can only be one <code>&lt;body&gt; <\/code>element in an HTML document.<\/li><\/ul>\n\n\n\n<p>Here are a few more common tags. You could use this code as a starting point for most HTML pages: <\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">&lt;!DOCTYPE html&gt;\n&lt;html lang=&quot;en&quot;&gt;\n  &lt;head&gt;\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;\n    &lt;title&gt;Web Page Title&lt;\/title&gt;\n    &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n      &lt;div id=&quot;wrapper&quot;&gt;\n        &lt;header&gt;\n          &lt;h1&gt;Site title&lt;\/h1&gt;\n          &lt;h2&gt;Site subtitle&lt;\/h2&gt;\n        &lt;\/header&gt;\n        &lt;nav&gt;\n          &lt;ul&gt;\n            &lt;li&gt;&lt;a href=&quot;#&quot;&gt;link1&lt;\/a&gt;&lt;\/li&gt;\n            &lt;li&gt;&lt;a href=&quot;#&quot;&gt;link2&lt;\/a&gt;&lt;\/li&gt;\n            &lt;li&gt;&lt;a href=&quot;#&quot;&gt;link3&lt;\/a&gt;&lt;\/li&gt;\n            &lt;li&gt;&lt;a href=&quot;#&quot;&gt;link4&lt;\/a&gt;&lt;\/li&gt;\n            &lt;li&gt;&lt;a href=&quot;#&quot;&gt;link5&lt;\/a&gt;&lt;\/li&gt;\n          &lt;\/ul&gt;\n        &lt;\/nav&gt;\n        &lt;div id=&quot;content&quot;&gt;\n\t\t\t&lt;p&gt;This is a paragraph&lt;\/p&gt;\n        &lt;\/div&gt;\n        &lt;footer&gt;\n        &lt;\/footer&gt;\n    &lt;\/div&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/pre><\/div>\n\n\n\n<p>The &lt;body&gt; of this page includes :<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A <code>&lt;div id=\"wrapper\"&gt;<\/code> to &#8220;wrap around&#8221; the entire page and help us style it with CSS later<\/li><li>A <code>&lt;header&gt;<\/code> section with a main header <code>&lt;h1&gt; <\/code>and subheader <code>&lt;h2&gt; <\/code> <\/li><li>A <code>&lt;nav&gt;<\/code> section which is used to hold our main menu, comprised of an unordered list <code>&lt;ul&gt;<\/code> of list items <code>&lt;li&gt;<\/code>, each one containing a link <code>&lt;a&gt;<\/code><\/li><li>A <code>&lt;div id=\"content\"&gt;<\/code> to separate the main content of the page and help is style it later <\/li><li>A paragraph <code>&lt;p&gt;<\/code><\/li><li>A footer <code>&lt;footer&gt; <\/code>often used to provide extra information and navigation options<\/li><\/ul>\n\n\n\n<p class=\"has-text-align-right\"><em><a href=\"#top\">go back to top<\/a><\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">CSS<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"What-is-CSS\">What is CSS?<\/h3>\n\n\n\n<p>CSS (Cascading Style Sheets) defines the style and layout of HTML elements (i.e: color, size, typography etc\u2026)<\/p>\n\n\n\n<p class=\"has-text-align-right\"><em><a href=\"#top\">go back to top<\/a><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Types-of-CSS\">Types of CSS<\/h3>\n\n\n\n<p>CSS can be implemented in three different, complimentary ways: Linked, Embedded and Inline.<\/p>\n\n\n\n<p>When applied to one web page, Inline CSS will take precedence over Embedded and Linked CSS, and Embedded CSS will take precedence over Linked CSS.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Linked CSS<\/strong><\/h4>\n\n\n\n<p>When using Linked CSS, CSS code is written in a separate document saved with the extension .css. This CSS document is then linked to an HTML file in one of the following methods. Both methods require typing the following code into the head section of the HTML document.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;link rel=&quot;stylesheet&quot; href=&quot;http:\/\/www.revitalk.com\/mmp100\/mystyles.css&quot; type=&quot;text\/css&quot;&gt;\n<\/pre><\/div>\n\n\n\n<p>or:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;style type=&quot;text\/css&quot;&gt;\n    @import url(mystyles.css);\n    &lt;\/style&gt;\n<\/pre><\/div>\n\n\n\n<p>Linked CSS is a preferred method to implement CSS because:<\/p>\n\n\n\n<p>It allows maximum separation of style and structure \u2013 all style information of a web page is contained in one document and away from the HTML code. Linked CSS can be applied to several web pages that share design.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Embedded CSS<\/strong><\/h4>\n\n\n\n<p>When using embedded CSS, CSS code is written inside the head section of the HTML documents using the&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;style type=&quot;text\/css&quot;&gt;\n    .code {font-family: Courier, mono;}\n    td {border: 1px;}\n    &lt;\/style&gt;\n<\/pre><\/div>\n\n\n\n<p>Embedded CSS will apply to one web page only \u2013 the page where it is written.<\/p>\n\n\n\n<p>Embedded CSS can be used to override linked CSS<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Inline CSS<\/strong><\/h4>\n\n\n\n<p>Inline CSS is written inside an HTML tag. For instance:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;p class=&quot;code&quot;&gt;&lt;p style=&quot;font-size: 2em; color: red;&quot;&gt;Inline\n    CSS&lt;\/p&gt;\n<\/pre><\/div>\n\n\n\n<p>Inline CSS is used mainly to override embedded or linked CSS rules.<\/p>\n\n\n\n<p class=\"has-text-align-right\"><em><a href=\"#top\">go back to top<\/a><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"How-to-write-CSS\">How to write CSS<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Anatomy of a CSS Rule<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/bmcc-mmp.github.io\/mmp460\/css\/cssrule1.png\" alt=\"CSS rule\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Grouping selectors<\/strong><\/h4>\n\n\n\n<p>To apply the same style to two or more selectors:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">   h1, p {font: verdana;}\n<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Grouping declarations<\/strong><\/h4>\n\n\n\n<p>To apply two or more styles in one CSS rule:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">    td {font-size: small; background: yellow;}\n<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>CSS comments<\/strong><\/h4>\n\n\n\n<p>CSS comments are ignored by browsers. This is how they are written:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">    \/* this is a CSS comment *\/\n    \/* CSS comments can span several lines\n    and this is how to write them *\/\n<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Spaces and Line Breaks<\/strong><\/h4>\n\n\n\n<p>Spaces and line breaks in CSS code are ignored by browsers.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Case Sensitivity<\/strong><\/h4>\n\n\n\n<p>CSS is not case sensitive except for names of font families, files, classes and ids.<\/p>\n\n\n\n<p class=\"has-text-align-right\"><em><a href=\"#top\">go back to top<\/a><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"CSS-Selectors\">CSS Selectors<\/h3>\n\n\n\n<p>A CSS selector points to the HTML element targeted and affected by the CSS rule.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Elements selectors<\/strong><\/h4>\n\n\n\n<p>Element selectors target html elements. Use element selectors when you want all page elements enclosed in a particular tag to share style. Examples:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">    h1 {font: Georgia;}\n    li {list-style-type: disc;}\n<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Class selectors<\/strong><\/h4>\n\n\n\n<p>To apply the same CSS rule to multiple HTML elements give them the same class and then use a CSS class selector to target them all at once.<\/p>\n\n\n\n<p>For example,<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;p class=&quot;staffname&quot;&gt; \n<\/pre><\/div>\n\n\n\n<p>and then in CSS:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">    p.staffname {color: gray;}\n<\/pre><\/div>\n\n\n\n<p>If you omit the tag preceding the class name the rule will apply to any page element that has the class staffname. Note that all class names in CSS must start with a period.<\/p>\n\n\n\n<p>The following CSS rule will affect all html elements with the class navigation:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">    .navigation {font-family: arial; font-size:small;}\n<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>ID selectors<\/strong><\/h4>\n\n\n\n<p>To give a page element a unique style use the id attribute in the HTML code, for example:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;h1 id=\u201dfirstline\u201d&gt;\n<\/pre><\/div>\n\n\n\n<p>Then use an id selector to target an HTML element with a specific id, such as in:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">    h1#firstline {border:0;}\n<\/pre><\/div>\n\n\n\n<p>If you choose to omit the tag, such as in #firstline {border:0;} the rule will apply to any HTML element with the id firstline and not only to an h1 element. Specifying the tag ensures applying this rule only to a very particular element.<\/p>\n\n\n\n<p>Ids must be unique, i.e. must be given to only one element in a web page.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Descendant Selectors<\/strong><\/h4>\n\n\n\n<p>Descendant selectors identify HTML elements by one of their ancestor elements. An ancestor is a tag that nests another tag. In the example below the p is an ancestor of strong and strong is a decedent of p.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;p&gt;Have a &lt;strong&gt;great&lt;\/strong&gt;day!&lt;\/p&gt;\n<\/pre><\/div>\n\n\n\n<p>Descendant selectors are a great way to pinpoint an HTML elements without the need for class or id names, i.e. saving time and keeping HTML code neater. This is how to write them<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">    p strong {color: red;}\n<\/pre><\/div>\n\n\n\n<p>And this CSS rule targets the bold line in an unordered list<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">    ul strong {background-color: #F7E9FF; font-weight: normal;}\n<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Pseudo-Class Selectors<\/strong><\/h4>\n\n\n\n<p>These selectors are not \u2018real\u2019 class selectors as no class is specified in the HTML code but is defined by user actions (i.e. hovering, clicking, visiting a page).<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">    a:link {color: blue; text-decoration: none;}\n\n    a:visited {color: gray; text-decoration: none;}\n\n    a:hover {color: red; text-decoration: underline;}\n\n    a:active {color: green; text-decoration: underline;}\n<\/pre><\/div>\n\n\n\n<p>Note that you must write these rules in this order or they will not apply properly to hyperlinks.<\/p>\n\n\n\n<p class=\"has-text-align-right\"><em><a href=\"#top\">go back to top<\/a><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"CSS-box-model\">CSS box model<\/h3>\n\n\n\n<p>CSS renders HTML elements as boxes with content area and optional padding, borders and margins. All these properties can be set to be different on the different sides of the box. The CSS properties for width and height only specify the width and height of the content area.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/bmcc-mmp.github.io\/mmp460\/css\/box-model.gif\" alt=\"CSS box model diagram\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-right\"><em><a href=\"#top\">go back to top<\/a><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Width-Max-Width\">Width &amp; Max-Width<\/h3>\n\n\n\n<p>The&nbsp;<strong><code>width<\/code><\/strong>&nbsp;CSS property sets an element&#8217;s width. By default, it sets the width of the&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/CSS_Box_Model\/Introduction_to_the_CSS_box_model#content-area\">content area<\/a>, but if&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/box-sizing\"><code>box-sizing<\/code><\/a>&nbsp;is set to&nbsp;<code>border-box<\/code>, it sets the width of the&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/CSS_Box_Model\/Introduction_to_the_CSS_box_model#border-area\">border area<\/a>.<\/p>\n\n\n\n<p>The&nbsp;<strong><code>max-width<\/code><\/strong>&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\">CSS<\/a>&nbsp;property sets the maximum width of an element. It prevents the&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/used_value\">used value<\/a>&nbsp;of the&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/width\"><code>width<\/code><\/a>&nbsp;property from becoming larger than the value specified by&nbsp;<code>max-width<\/code>.<\/p>\n\n\n\n<p class=\"has-text-align-right\"><em><a href=\"#top\">go back to top<\/a><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">CSS units<\/h3>\n\n\n\n<p>When sizing elements with CSS, you can use different units. Here is a list of common units and when to use them <em>(from http:\/\/thenewcode.com\/775\/Which-CSS-Measurements-To-Use-When)<\/em>:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Pixels (px):<\/strong><\/h4>\n\n\n\n<p><strong>Use for: <\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Hairline borders and general elements when creating fixed-width designs<\/li><li>Values for\u00a0<a href=\"http:\/\/thenewcode.com\/789\/Web-Developer-Reading-List-CSS-Gradients-and-Shadows\">CSS shadow<\/a>\u00a0displacement. <\/li><\/ul>\n\n\n\n<p><strong>Don\u2019t use for:&nbsp;<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Avoid using in\u00a0<a href=\"http:\/\/thenewcode.com\/154\/CSS-media-queries\"><code>@media<\/code><\/a>\u00a0breakpoints, as doing so reinforces the tendency to create for device dimensions, rather than where your\u00a0<strong>design<\/strong>\u00a0needs to adapt. Use\u00a0<code>rem<\/code>\u00a0or\u00a0<code>em<\/code>\u00a0instead.<\/li><li>Typography. (Exception: setting a base font-size in a\u00a0<a href=\"http:\/\/thenewcode.com\/210\/CSS-Resets\">CSS reset<\/a>).<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Percentage (%)<\/h4>\n\n\n\n<p><strong>Use for:<\/strong>&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Making&nbsp;<a href=\"http:\/\/thenewcode.com\/586\/CSS-Fluid-Image-Techniques-for-Responsive-Site-Design\">responsive images<\/a>&nbsp;and&nbsp;<a href=\"http:\/\/thenewcode.com\/627\/Make-A-Responsive-CSS3-Image-Slider\">containers<\/a><\/li><li>Setting&nbsp;<code>height<\/code>&nbsp;on the body in some cases.<\/li><\/ul>\n\n\n\n<p><strong>Don\u2019t use for:<\/strong>&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Typography. (Exception:&nbsp;<a href=\"http:\/\/thenewcode.com\/300\/CSS3-and-HTML5-Stylesheet-Reset\"><code>font-size<\/code>&nbsp;CSS reset.<\/a>)<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">em, ex<\/h4>\n\n\n\n<p><strong>Use for<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Typography, and elements related to typography (margins, for example), with the understanding that&nbsp;<code>em<\/code>&nbsp;and&nbsp;<code>ex<\/code>&nbsp;<a href=\"http:\/\/thenewcode.com\/673\/REM-Not-the-Band\">have a subtle \u201cgotchas\u201d when used in complex layouts<\/a>. <\/li><li>Consider using&nbsp;<a href=\"http:\/\/thenewcode.com\/673\/REM-Not-the-Band\"><code>rem<\/code><\/a>&nbsp;as an alternative (see below).<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">rem<\/h4>\n\n\n\n<p><strong>Used as<\/strong>:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"http:\/\/thenewcode.com\/673\/REM-Not-the-Band\">A more robust and predictable alternative to&nbsp;<code>em<\/code>&nbsp;and&nbsp;<code>ex<\/code><\/a>, and employed for the same purposes, including&nbsp;<code>@media<\/code>&nbsp;query breakpoints.<\/li><\/ul>\n\n\n\n<p><strong>Don\u2019t use<\/strong>: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>If you wish to support IE8 and earlier. Or, use the unit but include a fallback (by providing an alternate measurement in a more common unit&nbsp;<em>before<\/em> the&nbsp;<code>rem<\/code>&nbsp;measurement) or a polyfill.<\/li><\/ul>\n\n\n\n<p class=\"has-text-align-right\"><em><a href=\"#top\">go back to top<\/a><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Block-level-and-Inline-elements\">Block-level and Inline elements<\/h3>\n\n\n\n<p><strong>Block-level<\/strong>&nbsp;are HTML elements that occupy a full horizontal line on the page. They always start in a new line.<\/p>\n\n\n\n<p><strong>Inline elements<\/strong>&nbsp;are HTML elements that are laid out side by side. They continue the line of the element before them and the line will wrap if they reach the right edge of the window.<\/p>\n\n\n\n<p>Block or Inline are behaviors that are applied with CSS using the&nbsp;<em>display<\/em>&nbsp;property.<\/p>\n\n\n\n<p>However, browsers pre-define all HTML elements as either inline or block. For example, browsers define P, DIV and H1-H6 as block levels, and IMG and SPAN as inline. You can overide this definition in your own CSS file. For example,<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">    h2{\n    display: inline;\n    }\n<\/pre><\/div>\n\n\n\n<p>Some CSS properties behave differently when applied to block-level and inline elements. For example, you can set the width of a block-level element.<\/p>\n\n\n\n<p class=\"has-text-align-right\"><em><a href=\"#top\">go back to top<\/a><\/em>&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"CSS-type-properties\">CSS type properties<\/h3>\n\n\n\n<p>CSS allows you to style typography. Here are some important properties <em>(from https:\/\/css-tricks.com\/<\/em>)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">font-family<\/h4>\n\n\n\n<p>The font-family property defines the font that is applied to the selected element. The font that is selected is not a single font face, but a \u201cfamily\u201d, and thus may be dependent on other typographic property values to select the correct face within the family.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">body {font-family: Arial, Helvetica, sans-serif;\n}<\/pre><\/div>\n\n\n\n<p>A value can be one of the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A font family name that matches a font that is embedded on the page or available on the user\u2019s system.<\/li><li>A series of family names, separated by commas, which can include a generic family name<\/li><li>If multiple family names are used, the browser will select the first one it finds either embedded on the page using @font-face or installed on the user\u2019s operating system.<\/li><\/ul>\n\n\n\n<p><strong>Generic family name<\/strong><\/p>\n\n\n\n<p>It is recommended to have a generic family listed last as a fallback to ensure the best typographic experience:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">code {\n    font-family: Courier, Monaco, monospace;\n}<\/pre><\/div>\n\n\n\n<p>In the above example, \u201cCourier\u201d and \u201cMonaco\u201d are real family names of actual fonts, whereas \u201cmonospace\u201d is just a generic reference to any font installed on the user\u2019s system that\u2019s monospaced.<\/p>\n\n\n\n<p>If the first two are not found installed, the browser will select the best option, but only from monospace fonts. Without the generic family, the font would default to whatever is the default font on the user\u2019s system (likely a serif or sans-serif), which would be undesirable.<\/p>\n\n\n\n<p>Generic family names include serif, sans-serif, cursive, fantasy, and monospace.<\/p>\n\n\n\n<p>If a family name matches a generic family name, the family name should be quoted to indicate that it is not generic.<\/p>\n\n\n\n<p><strong>Multiple Words<\/strong><\/p>\n\n\n\n<p>If a family name contains multiple words, separated by spaces, it is recommended to list the family name in quotation marks (single or double):<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">code {\n    font-family: &quot;Times New Roman&quot;, Georgia, serif;\n}<\/pre><\/div>\n\n\n\n<p>This isn\u2019t always necessary, but it is generally safer to include the quotes for any family name that has spaces or special characters.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Font-size<\/h4>\n\n\n\n<p>The&nbsp;<code>font-size<\/code>&nbsp;property specifies the size, or height, of the font.&nbsp;<code>font-size<\/code>affects not only the font to which it is applied, but is also used to compute the value of em, rem, and ex length units.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">p { font-size: 20px; }<\/pre><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">em unit<\/h5>\n\n\n\n<p>The em unit is a relative unit based on the computed value of the font size of the parent element. This means that child elements are always dependent on their parent to set their font-size. <\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">.container { \n  font-size: 16px; \n} \np { \n  font-size: 1em; \n} \nh2 { \n  font-size: 2em; \n}<\/pre><\/div>\n\n\n\n<p>In the example above, the paragraph will have a font-size of 16px because 1 x 16 = 16px whereas the heading will be 32px because 2 x 16 = 32px. There are many advantages to scaling type up depending on the font-size of the parent element, namely we can wrap elements within a container and know that all of the children will always be relative to one another.<\/p>\n\n\n\n<p>(Change the value on <a href=\"https:\/\/codepen.io\/team\/css-tricks\/pen\/a4b0f03f3fccdb8534cc6a3df6cf97ec\">this demo<\/a> to see the result).<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">REM unit<\/h5>\n\n\n\n<p>In the case of rem units, however, the font-size is dependent on the value of the root element (or the&nbsp;<code>html<\/code>&nbsp;element).<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">html { \n  font-size: 16px; \n} p { \n  font-size: 1.5rem; \n}<\/pre><\/div>\n\n\n\n<p>In the above example, the rem unit is equal to 16px (because it is inherited from the&nbsp;<code>html<\/code>\/root element) and thus the font size for all paragraph elements will compute to 24px (1.5 x 16 = 24). Unlike em units, the paragraph will ignore the styling of all its parents besides the root.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Viewport units<\/h5>\n\n\n\n<p>Viewport units, such as&nbsp;<code>vw<\/code>&nbsp;and&nbsp;<code>vh<\/code>, set the font-size of an element relative to the dimensions of the viewport:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>1vw = 1% of viewport width<\/li><li>1vh = 1% of viewport height<\/li><\/ul>\n\n\n\n<p>So if we take the following example:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">.element { \n  font-size: 100vh; \n}<\/pre><\/div>\n\n\n\n<p>Then this will state that the font-size of the element should always be 100% of the height of the viewport at all times (50vh would be 50%, 15vh would be 15% and so on). <\/p>\n\n\n\n<p>(Change the value on <a href=\"https:\/\/codepen.io\/team\/css-tricks\/pen\/6e288ced34cef76986155f4a1278df6a\">this demo<\/a> to see the result).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">font-weight<\/h4>\n\n\n\n<p>The&nbsp;<code>font-weight<\/code>&nbsp;property sets the weight, or thickness, of a font and is dependent either on available font faces within a font family or weights defined by the browser.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">span { \n  font-weight: bold; \n}<\/pre><\/div>\n\n\n\n<p>The&nbsp;<code>font-weight<\/code>&nbsp;property accepts either a keyword value (normal, bold, bolder, lighter) or predefined numeric value (between 100 and 900). The keyword value&nbsp;<code>normal<\/code>&nbsp;maps to the numeric value&nbsp;<code>400<\/code>&nbsp;and the value&nbsp;<code>bold<\/code>&nbsp;maps to&nbsp;<code>700<\/code>. <\/p>\n\n\n\n<p>(Change the value on <a href=\"https:\/\/codepen.io\/impressivewebs\/pen\/EIncg\">this demo<\/a> to see the result).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Color<\/h4>\n\n\n\n<p>The&nbsp;<code>color<\/code>&nbsp;property in CSS sets the color of text and text decorations.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">p { \n  color: #00FFFF; \n}<\/pre><\/div>\n\n\n\n<p>The&nbsp;<code>color<\/code>&nbsp;property can accept any CSS color value:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Named colors: for example, \u201caqua\u201d.<\/li><li>Hex colors: for example, #00FFFF or #0FF.<\/li><li>RGB and RGBa colors: for example, rgb(0, 255, 255) and rgba(0, 255, 255, .5).<\/li><li>HSL and HSLa colors: for example, hsl(180, 100%, 50%) and hsla(180, 100%, 50%, .5).<\/li><\/ul>\n\n\n\n<p>(Change the value on <a href=\"https:\/\/codepen.io\/team\/css-tricks\/pen\/41e4ddd98fd0c8e06e4d75b5027854fc\">this demo<\/a> to see the result).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Font-style<\/h4>\n\n\n\n<p>The&nbsp;<code>font-style<\/code>&nbsp;property allows you to make text appear italicized (i.e. sloped, or slanted).<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">em { \n  font-style: italic; \n}<\/pre><\/div>\n\n\n\n<p>This property accepts one of three possible values:&nbsp;<code>normal<\/code>,&nbsp;<code>italic<\/code>, and&nbsp;<code>oblique<\/code>. According to the spec, \u201cItalic forms are generally cursive in nature while oblique faces are typically sloped versions of the regular face.\u201d However, if the font being used does not have italic or oblique faces available, in most cases there is little, if any, difference between italic and oblique.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Line-height<\/h4>\n\n\n\n<p>The&nbsp;<code>line-height<\/code>&nbsp;property defines the amount of space above and below inline elements. That is, elements that are set to&nbsp;<code>display: inline<\/code>&nbsp;or&nbsp;<code>display: inline-block<\/code>. This property is most often used to set the&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Leading\">leading<\/a>for lines of text.<\/p>\n\n\n\n<p>The&nbsp;<code>line-height<\/code>&nbsp;property can accept the keyword values&nbsp;<code>normal<\/code>&nbsp;or&nbsp;<code>none<\/code> as well as a number, length, or percentage. <\/p>\n\n\n\n<p>The recommended method for defining line height is using a number value, referred to as a \u201cunitless\u201d line height. Unitless line heights are recommended due to the fact that child elements will inherit the raw number value, rather than the computed value. With this, child elements can compute their line heights based on their computed font size, rather than inheriting an arbitrary value from a parent that is more likely to need overriding.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">p { \n  line-height: 1.5; \n}<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Letter-spacing<\/h4>\n\n\n\n<p>The&nbsp;<code>letter-spacing<\/code>&nbsp;property controls the amount of space between each letter in a given element or block of text. Values supported by&nbsp;<code>letter-spacing<\/code>&nbsp;include font-relative values (em, rem), parent-relative values (percentage), absolute values (px) and the&nbsp;<code>normal<\/code>&nbsp;property, which resets to the font\u2019s default.&nbsp;<\/p>\n\n\n\n<p>Using font-relative values is recommended, so that the&nbsp;<code>letter-spacing<\/code>increases or decreases appropriately when the font-size is changed, either by design or by user behavior.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">p {\n  letter-spacing: 0.0625em;\n}<\/pre><\/div>\n\n\n\n<p>(Change the value on <a href=\"https:\/\/codepen.io\/zakkain\/pen\/kIEli\">this demo<\/a> to see the result).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Text-shadow<\/h4>\n\n\n\n<p>You can add a shadow to your text with the <code>text-shadow<\/code> property.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">p { \n  text-shadow: 1px 1px 1px #000; \n}<\/pre><\/div>\n\n\n\n<p>The first two values specify the length of the shadow offset. The first value specifies the horizontal distance and the second specifies the vertical distance of the shadow. The third value specifies the blur radius and the last value describes the color of the shadow:<\/p>\n\n\n\n<p>1. value = The X-coordinate<br>2. value = The Y-coordinate<br>3. value = The blur radius<br>4. value = The color of the shadow<\/p>\n\n\n\n<p>(Change the value on <a href=\"https:\/\/codepen.io\/chriscoyier\/pen\/urkCd\">this demo<\/a> to see the result).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Text-transform<\/h4>\n\n\n\n<p>The&nbsp;<code>text-transform<\/code>&nbsp;property in CSS controls text case and capitalization.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">.lowercase {\n  text-transform: lowercase;\n  }<\/pre><\/div>\n\n\n\n<p>It can take the following values: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>lowercase<\/code>&nbsp;makes all of the letters in the selected text lowercase.<\/li><li><code>uppercase<\/code>&nbsp;makes all of the letters in the selected text uppercase.<\/li><li><code>capitalize<\/code>&nbsp;capitalizes the first letter of each word in the selected text.&nbsp;<\/li><li><code>none<\/code>&nbsp;leaves the text\u2019s case and capitalization exactly as it was entered.<\/li><li><code>inherit<\/code>&nbsp;gives the text the case and capitalization of its parent.<\/li><\/ul>\n\n\n\n<p>(Change the value on <a href=\"https:\/\/codepen.io\/mariemosley\/pen\/0f4293fce0d14aafc3818c950ab0ded3\">this demo<\/a> to see the result).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">text-align<\/h4>\n\n\n\n<p>The&nbsp;<code>text-align<\/code>&nbsp;property in CSS is used for aligning the inner content of a block element.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">p {\n  text-align: center;\n}<\/pre><\/div>\n\n\n\n<p>It can take the following values:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>left<\/code>&nbsp;\u2013 The default value. Content aligns along the left side.<\/li><li><code>right<\/code>&nbsp;\u2013 Content aligns along the right side.<\/li><li><code>center<\/code>&nbsp;\u2013 Content centers between the left and right edges. White space on the left and right sides of each line should be equal.<\/li><li><code>justify<\/code>&nbsp;\u2013 Content spaces out such that as many blocks fit onto one line as possible and the first word on that line is along the left edge and the last word is along the right edge.<\/li><li><code>inherit<\/code>&nbsp;\u2013 The value will be whatever the parent element\u2019s is.<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Text-decoration<\/h4>\n\n\n\n<p>The&nbsp;<code>text-decoration<\/code>&nbsp;property adds an underline, overline, line-through, or a combination of lines to selected text.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">h3 {\n  text-decoration: underline;\n}<\/pre><\/div>\n\n\n\n<p><a href=\"https:\/\/css-tricks.com\/almanac\/properties\/t\/text-decoration\/#values\"><\/a>It can take the following values:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>none<\/code>: no line is drawn, and any existing decoration is removed.<\/li><li><code>underline<\/code>: draws a 1px line across the text at its baseline.<\/li><li><code>line-through<\/code>: draws a 1px line across the text at its \u201cmiddle\u201d point.<\/li><li><code>overline<\/code>: draws a 1px line across the text, directly above its \u201ctop\u201d point.<\/li><li><code>inherit<\/code>: inherits the decoration of the parent.<\/li><\/ul>\n\n\n\n<p>(Change the value on <a href=\"https:\/\/codepen.io\/team\/css-tricks\/pen\/PwMmWv\">this demo <\/a>to see the result).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">font-variant<\/h4>\n\n\n\n<p>The&nbsp;<code>font-variant<\/code>&nbsp;property allows you to change the targeted text to small caps. This property has been extended in CSS3.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">p:first-line {\n    font-variant: small-caps; \/* default is `normal` *\/\n}<\/pre><\/div>\n\n\n\n<p>(Change the value on <a href=\"https:\/\/codepen.io\/impressivewebs\/pen\/tlKki\">this demo<\/a> to see the result).<\/p>\n\n\n\n<p class=\"has-text-align-right\"><em><a href=\"#top\">go back to top<\/a><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Using-an-Online-Font-Service\">Using an Online Font Service<\/h3>\n\n\n\n<p><em>(from: https:\/\/developer.mozilla.org\/en-US\/docs\/Learn\/CSS\/Styling_text\/Web_fonts)<\/em><\/p>\n\n\n\n<p>Online font services generally&nbsp;store and serve fonts for you, so you don&#8217;t have to worry about writing the&nbsp;<code>@font-face<\/code>&nbsp;code, and generally just need to insert a simple line or two of code into your site to make everything work. Examples include&nbsp;<a href=\"https:\/\/fonts.adobe.com\/\">Adobe Fonts<\/a>&nbsp;and&nbsp;<a href=\"http:\/\/www.typography.com\/cloud\/welcome\/\">Cloud.typography<\/a>. Most of these services are subscription-based, with the notable exception of&nbsp;<a href=\"https:\/\/www.google.com\/fonts\">Google Fonts<\/a>, a useful free service, especially for rapid testing work and writing demos.<\/p>\n\n\n\n<p> Let&#8217;s have a quick look at Google fonts:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Go to&nbsp;<a href=\"https:\/\/www.google.com\/fonts\">Google Fonts<\/a>.<\/li><li>Use the filters on the left-hand side to display the kinds of fonts you want to choose&nbsp;and choose a couple of fonts you like.<\/li><li>To select a font family, press the \u2295 button alongside it.<\/li><li>When you&#8217;ve chosen the font families, press the&nbsp;<em>[Number] Families Selected<\/em>&nbsp;bar at the bottom of the page.<\/li><li>In the resulting screen, you first need to copy the line of HTML code shown&nbsp;and paste it into the head of your HTML file. Put it above the existing&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Element\/link\"><code>&lt;link&gt;<\/code><\/a>&nbsp;element, so that the font is imported before you try to use it in your CSS.<\/li><li>You then need to copy the CSS declarations listed&nbsp;into your CSS as appropriate, to apply the custom fonts to your HTML.<\/li><\/ol>\n\n\n\n<p class=\"has-text-align-right\"><em><a href=\"#top\">go back to top<\/a><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Viewport-and-Media-Queries\">Viewport &amp; Media Queries<\/h3>\n\n\n\n<p>The&nbsp;<strong>viewport<\/strong>&nbsp;is the visible part of the screen. Different devices have different viewport sizes. You can see many device viewports&nbsp;<a href=\"http:\/\/viewportsizes.com\/\">listed here<\/a>.<\/p>\n\n\n\n<p>At the beginning of mobile web most websites were designed for the larger viewport of a computer screen and mobile browsers adapted by scaling down the websites to fit the smaller viewport of the device. In responsive design, we need to disable this practice. We do it with the following meta element:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">    &lt;meta name=&quot;viewport&quot; content=&quot;initial-scale=1&quot;&gt;\n<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Media Queries<\/strong><\/h4>\n\n\n\n<p>Responsive design make use of CSS media queries to change the design at several breakpoints. Common breakpoints are:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Mobile portrait \u2013 320px<\/li><li>Mobile landscape \u2013 480px<\/li><li>Tablet portrait \u2013 768px<\/li><li>Tablet landscape \u2013 1024px<\/li><li>Desktop \u2013 1224px<\/li><\/ul>\n\n\n\n<p>CSS Media queries are in the form of:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">    @media (max-width: 320px) {\n    }\n<\/pre><\/div>\n\n\n\n<p>or<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">    @media (min-width: 768px) {\n    }\n<\/pre><\/div>\n\n\n\n<p>For example:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">    @media (min-width: 768px) {\n      .toggle-menu{display:none;}\n      nav {display:block}\n    }\n<\/pre><\/div>\n\n\n\n<p class=\"has-text-align-right\"><em><a href=\"#top\">go back to top<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>HTML: What is HTML? | Element, Tags, and Attributes| Empty and container elements | Nesting, Parents, Children and Inheritance | HTML5 Sectional Elements | Formatting Text in HTML | Basic HTML Structure CSS: What is CSS? | Types of CSS | How to Write CSS? | CSS selectors | CSS box model | Width &amp; &hellip; <a href=\"https:\/\/openlab.bmcc.cuny.edu\/mmp460-1100\/html-css\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;HTML\/CSS&#8221;<\/span><\/a><\/p>\n","protected":false},"author":21,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"portfolio_post_id":0,"portfolio_citation":"","portfolio_annotation":"","openlab_post_visibility":"","footnotes":""},"class_list":["post-19","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp460-1100\/wp-json\/wp\/v2\/pages\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp460-1100\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp460-1100\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp460-1100\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp460-1100\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":44,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp460-1100\/wp-json\/wp\/v2\/pages\/19\/revisions"}],"predecessor-version":[{"id":1185,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp460-1100\/wp-json\/wp\/v2\/pages\/19\/revisions\/1185"}],"wp:attachment":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp460-1100\/wp-json\/wp\/v2\/media?parent=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}