{"id":7413,"date":"2021-09-09T18:51:49","date_gmt":"2021-09-09T18:51:49","guid":{"rendered":"http:\/\/sites.la.utexas.edu\/kb\/?p=7413"},"modified":"2021-10-26T14:36:03","modified_gmt":"2021-10-26T14:36:03","slug":"web-dev-basics-html-css","status":"publish","type":"post","link":"https:\/\/sites.la.utexas.edu\/kb\/2021\/09\/09\/web-dev-basics-html-css\/","title":{"rendered":"Web Dev Basics: HTML \/ CSS"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"alignleft size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"341\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/10\/Artboard-2-1-1024x341.png\" alt=\"\" class=\"wp-image-7965\" srcset=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/10\/Artboard-2-1-1024x341.png 1024w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/10\/Artboard-2-1-300x100.png 300w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/10\/Artboard-2-1-768x256.png 768w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/10\/Artboard-2-1-1536x512.png 1536w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/10\/Artboard-2-1-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>In this training, you will be introduced to HTML and CSS, the languages that can be used as tools to help you develop simple websites.<\/p>\n\n\n\n<p>This training is designed for those who do not have a background in programming \/ not familiar with HTML and CSS. <\/p>\n\n\n\n<p>If this is your first time writing code, welcome! Writing code can be frustrating and confusing at times, so please reach out to a team lead for help if you get stuck at any point. Good luck and have fun!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">HTML<\/h3>\n\n\n\n<p>HTML stands for Hypertext Markup Language, and it is the standard markup language for documents to be displayed in a web browser.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">CSS<\/h3>\n\n\n\n<p>CSS stands for Cascade Style Sheets, and it is a style sheet language used for describing the presentations of HTML. In other words, CSS is used to style the written HTML.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setting Up<\/h2>\n\n\n\n<p>You will be writing code and sharing it with JSFiddle. Go to <a href=\"https:\/\/jsfiddle.net\/\">https:\/\/jsfiddle.net\/<\/a> and create a new account if you don&#8217;t already have one. <\/p>\n\n\n\n<p>After you&#8217;ve successfully created an account and login, you should see this playground:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"507\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-10.43.03-AM-1024x507.png\" alt=\"\" class=\"wp-image-7416\" srcset=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-10.43.03-AM-1024x507.png 1024w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-10.43.03-AM-300x149.png 300w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-10.43.03-AM-768x380.png 768w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-10.43.03-AM-1536x760.png 1536w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-10.43.03-AM-2048x1014.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Click Ctrl \/ Cmd + S or &#8220;Save&#8221; in the top left corner and make sure that the JSFiddle URL is something like &#8220;https:\/\/jsfiddle.net\/[your_JSFiddle_username]\/[some_random_string]\/&#8221;. If your username is not present in the URL, you might not be logging in. <strong>Make sure that you are logged in so that your work is saved.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Writing Basic HTML<\/h2>\n\n\n\n<p>HTML describes the layout of the page. An HTML file essentially &#8220;lists&#8221; out all of the elements that a web page has. Each element is contained within a a pair of tags. Take a look at this HTML block:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;h2&gt;This is a heading&lt;\/h2&gt;\n&lt;p&gt;This is a paragraph&lt;\/p&gt;<\/code><\/pre>\n\n\n\n<p>The tags <code>&lt;h2&gt;&lt;\/h2&gt;<\/code> encloses a heading element (of size 2), where as the <code>&lt;p&gt;&lt;\/p&gt;<\/code> encloses a paragraph element. Notices how the closing tag has the form <code>&lt;\/tag_name&gt;<\/code> (with the forward slash in front of it). This is to distinguish it against the opening tag with the form <code>&lt;tag_name&gt;<\/code>.<\/p>\n\n\n\n<p>The above HTML block turns out like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"314\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-16-at-10.10.33-AM-1024x314.png\" alt=\"\" class=\"wp-image-7472\" srcset=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-16-at-10.10.33-AM-1024x314.png 1024w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-16-at-10.10.33-AM-300x92.png 300w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-16-at-10.10.33-AM-768x235.png 768w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-16-at-10.10.33-AM-1536x470.png 1536w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-16-at-10.10.33-AM-2048x627.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Exercise: Basic HTML Elements<\/h3>\n\n\n\n<p>Add some headers and some paragraphs. You can center your content around anything you&#8217;d like. Here&#8217;s an example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;h1&gt;\n  Schumann Geistervariationen\n&lt;\/h1&gt;\n&lt;h2&gt;\n  About the Piece\n&lt;\/h2&gt;\n&lt;p&gt;\n  The Geistervariationen (Ghost Variations), or Theme and Variations in \nE-flat major for piano, WoO 24, composed in 1854, is the last piano work of \nRobert Schumann. The variations were composed in the time leading up to his \nadmission to an asylum for the insane and are infrequently played or recorded \ntoday.\n&lt;\/p&gt;\n&lt;h2&gt;\n  History\n&lt;\/h2&gt;\n&lt;p&gt;\n  This was Schumann's last work before he was admitted to the mental hospital \nin Bonn-Endenich. Wolf-Dieter Seiffert wrote in the preface to Thema mit \nVariationen (Geistervariation) that at this time of his life, Schumann \nbelieved that he was surrounded by spirits who played him music, both \n\"wonderful\" and \"hideous\". They offered him \"most magnificent revelations\", \nbut also threatened to send him to Hell. Seiffert goes on to write that on 17 \nor 18 February 1854, Schumann wrote down a theme he said was dictated to him \nby voices like those of angels. He did not recognize that it was actually \na theme which he had composed previously. Several days later, he wrote a set \nof variations on this theme. While he was still working on the composition, \non 27 February he suddenly threw himself half clothed into the freezing \nRhine river, from which he was rescued and returned home. After surviving the \nsuicide attempt, he continued to work on it. The next day, he completed the \nwork and sent the manuscript to his wife, Clara, who had left him the \nnight before, on the advice of a doctor.\n&lt;\/p&gt;<\/code><\/pre>\n\n\n\n<p>And this is how it turns out:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"532\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.33.34-AM-1024x532.png\" alt=\"\" class=\"wp-image-7421\" srcset=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.33.34-AM-1024x532.png 1024w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.33.34-AM-300x156.png 300w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.33.34-AM-768x399.png 768w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.33.34-AM-1536x798.png 1536w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.33.34-AM-2048x1064.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Tips:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Click the &#8220;Run&#8221; button on the top left corner to render the HTML, or Ctrl \/ Cmd + S.<\/li><li>You can click the &#8220;Tidy&#8221; button to beautify your code.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"679\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.35.49-AM-1024x679.png\" alt=\"\" class=\"wp-image-7422\" srcset=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.35.49-AM-1024x679.png 1024w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.35.49-AM-300x199.png 300w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.35.49-AM-768x509.png 768w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.35.49-AM-1536x1019.png 1536w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.35.49-AM.png 1794w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Writing Basic CSS<\/h2>\n\n\n\n<p>CSS is used to style HTML elements. How do we know which HTML element to style? By selecting them!<\/p>\n\n\n\n<p>In CSS, we use <strong>selectors<\/strong> to select the HTML element we&#8217;d like to style, and apply styling to it. There are a few types of CSS selectors:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">CSS Element Selector<\/h3>\n\n\n\n<p>With this selector, you select the HTML element directly and apply stylings to it. Here&#8217;s the syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;element_name] {\n    \/* some stylings *\/\n}<\/code><\/pre>\n\n\n\n<p>So for example, to make the text of the <code>&lt;h1&gt;&lt;\/h1&gt;<\/code> element red:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>h1 {\n    color: red;\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">CSS ID Selector<\/h3>\n\n\n\n<p>The CSS Element Selector selects all of the elements of that type. Maybe you&#8217;ll ask the question: what if I want to style a specific element, and that element only?<\/p>\n\n\n\n<p>The answer is using the CSS ID selector. As the name suggested, this selector <strong>identifies <\/strong>a specific element by its ID. For example:<\/p>\n\n\n\n<p>HTML:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;h2 id=\"about-header\"&gt;\n    About the Piece\n&lt;\/h2&gt;\n&lt;h2 id=\"history-header\"&gt;\n    History\n&lt;\/h2&gt;<\/code><\/pre>\n\n\n\n<p>and CSS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#about-header {\n    color: #2e6f95;\n}\n\n#history-header {\n    color: #a01a58;\n}<\/code><\/pre>\n\n\n\n<p>renders:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"532\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.49.46-PM-1024x532.png\" alt=\"\" class=\"wp-image-7428\" srcset=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.49.46-PM-1024x532.png 1024w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.49.46-PM-300x156.png 300w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.49.46-PM-768x399.png 768w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.49.46-PM-1536x798.png 1536w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.49.46-PM-2048x1064.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">CSS Class Selector<\/h2>\n\n\n\n<p>Okay, but what if I want to style a group of elements (for uniformity). CSS offers the class selector that helps you achieve this effect. For example:<\/p>\n\n\n\n<p>HTML:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;h2 class=\"header\"&gt;\n    About the Piece\n&lt;\/h2&gt;\n&lt;h2 class=\"header\"&gt;\n    History\n&lt;\/h2&gt;<\/code><\/pre>\n\n\n\n<p>CSS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.header {\n    color: #4f772d;\n}<\/code><\/pre>\n\n\n\n<p>renders:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"531\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.55.55-PM-1024x531.png\" alt=\"\" class=\"wp-image-7429\" srcset=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.55.55-PM-1024x531.png 1024w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.55.55-PM-300x156.png 300w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.55.55-PM-768x398.png 768w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.55.55-PM-1536x797.png 1536w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.55.55-PM-2048x1062.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Exercise: Select and Style your Elements<\/h3>\n\n\n\n<p>In the CSS section of the JSFiddle, type in your CSS stylings for your existing headers and paragraphs. You can simply just change the color of the text, or do more fancy things with it. Use the element \/ ID \/ class selector as appropriate. Refer to this <a href=\"https:\/\/www.w3schools.com\/cssref\/\">CSS Reference<\/a> for all CSS Attributes. Not all attributes are applicable to all elements, so if something doesn&#8217;t work, try using something else for now.<\/p>\n\n\n\n<p><strong>Tip:<\/strong> you can use hex code to specify the color as well! The syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>h1 {\n    color: #c32f27;\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Styling Text<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Exercise: Using Google Fonts<\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li>Go to <a href=\"https:\/\/fonts.google.com\/\">Google Fonts<\/a> and pick 1 &#8211; 2 fonts that you like.<\/li><li>Click &#8220;Select this style&#8221; for the all of the font styles that want to use.<br><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"582\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.41.20-AM-1024x582.png\" alt=\"\" class=\"wp-image-7423\" srcset=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.41.20-AM-1024x582.png 1024w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.41.20-AM-300x171.png 300w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.41.20-AM-768x437.png 768w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.41.20-AM-1536x873.png 1536w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.41.20-AM-2048x1164.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><li>Once you&#8217;re done selecting all of the styles you like, click &#8220;View your selected families.&#8221;<br><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"507\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.44.55-AM-1024x507.png\" alt=\"\" class=\"wp-image-7424\" srcset=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.44.55-AM-1024x507.png 1024w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.44.55-AM-300x149.png 300w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.44.55-AM-768x380.png 768w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.44.55-AM-1536x760.png 1536w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.44.55-AM-2048x1014.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><li>Copy the HTML embed code here.<br><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"508\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.48.55-AM-1024x508.png\" alt=\"\" class=\"wp-image-7425\" srcset=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.48.55-AM-1024x508.png 1024w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.48.55-AM-300x149.png 300w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.48.55-AM-768x381.png 768w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.48.55-AM-1536x761.png 1536w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.48.55-AM-2048x1015.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><li>Paste it in the beginning of your HTML code and wrap it in a <code>&lt;head&gt;&lt;\/head&gt;<\/code> tag. Your code might look something like this.<br><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"685\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.57.55-AM-1024x685.png\" alt=\"\" class=\"wp-image-7426\" srcset=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.57.55-AM-1024x685.png 1024w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.57.55-AM-300x201.png 300w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.57.55-AM-768x514.png 768w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.57.55-AM-1536x1028.png 1536w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-11.57.55-AM.png 1790w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><li>Copy the <code>font-family<\/code> attribute and place it in the selector that you desire.<br><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"508\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.58.25-PM-1024x508.png\" alt=\"\" class=\"wp-image-7430\" srcset=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.58.25-PM-1024x508.png 1024w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.58.25-PM-300x149.png 300w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.58.25-PM-768x381.png 768w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.58.25-PM-1536x762.png 1536w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-09-at-12.58.25-PM-2048x1016.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><li>You only want to place the font you want for each selector (not both fonts). For example, here I&#8217;ve used Oswald for the headers, and Lato for body text.<br><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"321\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-16-at-10.13.15-AM-1024x321.png\" alt=\"\" class=\"wp-image-7473\" srcset=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-16-at-10.13.15-AM-1024x321.png 1024w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-16-at-10.13.15-AM-300x94.png 300w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-16-at-10.13.15-AM-768x240.png 768w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-16-at-10.13.15-AM.png 1476w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><br><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-16-at-10.13.02-AM-1024x538.png\" alt=\"\" class=\"wp-image-7475\" srcset=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-16-at-10.13.02-AM-1024x538.png 1024w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-16-at-10.13.02-AM-300x158.png 300w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-16-at-10.13.02-AM-768x403.png 768w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-16-at-10.13.02-AM-1536x807.png 1536w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-16-at-10.13.02-AM-2048x1076.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Exercise: Bold, Italics, and Underline<\/h3>\n\n\n\n<p>HTML has specific tags for these stylings. Take a look at this example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;p&gt;\n    This is a paragraph. &lt;b&gt;This text is bolded.&lt;\/b&gt; Then there's some \nnormal text. &lt;i&gt;This text is italicized.&lt;\/i&gt; Some more normal text. &lt;u&gt;This \ntext is underlined.&lt;\/u&gt;\n&lt;\/p&gt;<\/code><\/pre>\n\n\n\n<p>Use these tags and style your paragraph text.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Useful Functionality \/ Common Stylings<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Exercise: Embed a Link<\/h3>\n\n\n\n<p>Add a hyperlink to your text following this format:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;p&gt;\n    This is a paragraph, with a &lt;a \nhref=\"https:\/\/en.wikipedia.org\/wiki\/Geistervariationen\"&gt;hyperlink&lt;\/a&gt;.\n&lt;\/p&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Exercise: Style a Box<\/h2>\n\n\n\n<p>Create a box using the <code>&lt;div&gt;&lt;\/div&gt;<\/code> tag like so:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;div id=\"box\"&gt;\n    Some text here . . .\n&lt;\/div&gt;<\/code><\/pre>\n\n\n\n<p>Add some CSS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#box {\n    border: &#091;thickness] &#091;border style] &#091;color]\n}<\/code><\/pre>\n\n\n\n<p>So for example, this CSS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#box {\n  border: 3px solid #219ebc;\n  padding: 5px;\n  font-style: italic;\n}<\/code><\/pre>\n\n\n\n<p>renders:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"544\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-23-at-12.55.30-PM-1024x544.png\" alt=\"\" class=\"wp-image-7548\" srcset=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-23-at-12.55.30-PM-1024x544.png 1024w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-23-at-12.55.30-PM-300x159.png 300w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-23-at-12.55.30-PM-768x408.png 768w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-23-at-12.55.30-PM-1536x816.png 1536w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/09\/Screen-Shot-2021-09-23-at-12.55.30-PM-2048x1088.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Now it&#8217;s your turn!<\/h2>\n\n\n\n<p>Use what you&#8217;ve learned and the resources provided to style a simple page on JSFiddle. Save the JSFiddle on the site (not on your local computer), and share the JSFiddle URL on your Basecamp for feedback.<\/p>\n\n\n\n<p>If you&#8217;d like some inspirations, check out this example of the page I&#8217;ve made: <a href=\"https:\/\/jsfiddle.net\/nhaithuy\/ptuaw8by\/229\/\">https:\/\/jsfiddle.net\/nhaithuy\/ptuaw8by\/229\/<\/a><\/p>\n\n\n\n<p>W3School is also a really good place to look for how to do something in HTML \/ CSS: <a href=\"https:\/\/www.w3schools.com\/html\/default.asp\">https:\/\/www.w3schools.com\/html\/default.asp<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"341\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/06\/basic-training-last-steps-1-1024x341.png\" alt=\"\" class=\"wp-image-6973\" srcset=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/06\/basic-training-last-steps-1-1024x341.png 1024w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/06\/basic-training-last-steps-1-300x100.png 300w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/06\/basic-training-last-steps-1-768x256.png 768w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/06\/basic-training-last-steps-1-1536x512.png 1536w, https:\/\/sites.la.utexas.edu\/kb\/files\/2021\/06\/basic-training-last-steps-1-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In this training, you will be introduced to HTML and CSS, the languages that can be used as tools to help you develop simple websites. This training is designed for those who do not have a background in programming \/ &hellip; <a href=\"https:\/\/sites.la.utexas.edu\/kb\/2021\/09\/09\/web-dev-basics-html-css\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":744,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7413","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/posts\/7413","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/users\/744"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/comments?post=7413"}],"version-history":[{"count":35,"href":"https:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/posts\/7413\/revisions"}],"predecessor-version":[{"id":7967,"href":"https:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/posts\/7413\/revisions\/7967"}],"wp:attachment":[{"href":"https:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/media?parent=7413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/categories?post=7413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/tags?post=7413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}