<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Semhar Hidad</title>
    <description>The latest articles on Forem by Semhar Hidad (@semharhidad).</description>
    <link>https://forem.com/semharhidad</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1119025%2Fc4404269-4665-4bd2-afce-92180e595c37.jpeg</url>
      <title>Forem: Semhar Hidad</title>
      <link>https://forem.com/semharhidad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/semharhidad"/>
    <language>en</language>
    <item>
      <title>Three Pillars of Web Development</title>
      <dc:creator>Semhar Hidad</dc:creator>
      <pubDate>Tue, 08 Aug 2023 17:54:25 +0000</pubDate>
      <link>https://forem.com/semharhidad/three-pillars-of-web-development-3p38</link>
      <guid>https://forem.com/semharhidad/three-pillars-of-web-development-3p38</guid>
      <description>&lt;p&gt;When diving into web development, it can be a bit overwhelming looking over everything that goes into building a competent interactive website. &lt;/p&gt;

&lt;p&gt;Git &amp;amp; GitHub, libraries and frameworks, APIs &amp;amp; Postman, and UI &amp;amp; UX, all cover a lot of information. It can be intimidating staring down all of these new and unfamiliar technologies all at once. &lt;/p&gt;

&lt;p&gt;While the field of web development includes many concepts and technologies you should be familiar with, the three main pillars you should begin with are HTML, CSS, and JavaScript. Start strong with these fundamentals and everything else will become much easier to understand. &lt;/p&gt;

&lt;p&gt;This article will discuss the main components of each of these pillars as well as additional resources to help you on your web development journey. &lt;/p&gt;

&lt;h2&gt;
  
  
  HTML
&lt;/h2&gt;

&lt;p&gt;HTML stands for hypertext markup language. This markup language is the basic foundation and structure of a webpage. Without HTML, CSS has nothing to style, and JavaScript has nothing to interact with. &lt;/p&gt;

&lt;p&gt;Hypertext illustrates how the web is interconnected through hypertext links. Your ability to click this hyperlink and connect to a different webpage is a large part of what makes the web so successful.&lt;/p&gt;

&lt;p&gt;Markup illustrates the syntax that we use for HTML in order for the browser to understand how to correctly display the content of the HTML file to the user. &lt;/p&gt;

&lt;p&gt;When building a website, HTML is the starting point. Your webpage is essentially an HTML file. If you are building a multipage website, then you will need multiple HTML files, with each file representing its own webpage. &lt;/p&gt;

&lt;p&gt;It is common practice among developers to name the main page “index.html”, and to include all the HTML files together in one directory. &lt;/p&gt;

&lt;p&gt;Your HTML files display the content of your webpage, such as the text, headings, images, buttons, etc. You can add these pieces of content by including elements in your file. An HTML element includes a start tag, the content you want to display, and an end tag. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qAKkPH0y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g3xx6c3bj2mdjpf0eii0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qAKkPH0y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g3xx6c3bj2mdjpf0eii0.png" alt="Picture of an HTML Element, including start tag, content, and end tag" width="500" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that not all HTML elements require an end tag. For example, the image tag does not require an end tag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"assets/images/labradors.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Picture of Labradors"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Important HTML Tags you should be familiar with:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j5RuCNvX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oz7a7nuyl7500a722ws4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j5RuCNvX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oz7a7nuyl7500a722ws4.png" alt="List of important HTML Tags" width="500" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are several HTML tags available for use, but don’t think that you need to memorize all of them. Just become familiar with the major ones and you’ll pick up any others that you need along the way. &lt;/p&gt;

&lt;h2&gt;
  
  
  CSS
&lt;/h2&gt;

&lt;p&gt;CSS stands for Cascading Style Sheet. It is a popular styling language that gives each website flavor and you guessed it, style! &lt;/p&gt;

&lt;p&gt;Before CSS came along, most websites on the internet looked the same. This is because developers were severely limited by what they could design using just HTML.&lt;/p&gt;

&lt;p&gt;Today, with a plethora of design options in CSS we can change the color, font, sizing, and more of our websites. &lt;/p&gt;

&lt;p&gt;The cascading part of the name illustrates the method or algorithm CSS uses to determine which styles it will apply. There are three ways of styling HTML elements using CSS, inline, internal, and external. Each of these methods has a priority level of importance. &lt;/p&gt;

&lt;h3&gt;
  
  
  Inline
&lt;/h3&gt;

&lt;p&gt;As the name suggests, this method involves applying CSS directly in the same line as the HTML element. CSS is applied as an attribute to the element using the keyword style.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;"color:red"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;This&lt;/span&gt; &lt;span class="nt"&gt;is&lt;/span&gt; &lt;span class="nt"&gt;my&lt;/span&gt; &lt;span class="nt"&gt;heading&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;-You apply the CSS style inside the opening tag of the element. &lt;/p&gt;

&lt;p&gt;This method is simple and easy to add, but it’s not recommended for styling the entire website but instead for targeting a single element. &lt;/p&gt;

&lt;h3&gt;
  
  
  Internal
&lt;/h3&gt;

&lt;p&gt;This method involves placing all of the CSS styling rules inside the header section of the HTML file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;head&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;meta&lt;/span&gt; &lt;span class="nt"&gt;charset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;"UTF-8"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;meta&lt;/span&gt; &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;"viewport"&lt;/span&gt; &lt;span class="nt"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;My&lt;/span&gt; &lt;span class="nt"&gt;Site&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;head&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using this method, you can target multiple elements and apply different styling rules to each. Internal is great when you only need to style a single html file, however, it’s not recommended for targeting multi-page websites. This is because the CSS styling located in the head section of the file only applies to the single html file, and not the entire website. &lt;/p&gt;

&lt;h3&gt;
  
  
  External
&lt;/h3&gt;

&lt;p&gt;This method involves creating an external style sheet, placing CSS styling inside the sheet, and then linking all html files to this sheet. By convention, most developers name this sheet “styles.css”. You can name the file whatever you like as long as the extension ends in CSS. &lt;/p&gt;

&lt;p&gt;To link your HTML files to the style sheet, use the link element with the rel and href attribute. This command tells the file where to pull CSS styling rules from.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;link&lt;/span&gt; &lt;span class="nt"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;"stylesheet"&lt;/span&gt; &lt;span class="nt"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;"style.css"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;-rel represents the relationship and href represents the location of the style sheet.&lt;/p&gt;

&lt;p&gt;This method is recommended in general, but especially when you are working with a multi-page website. Otherwise, you will need to style each page individually and this could lead to unnecessary complexity and inconsistency in your website.&lt;/p&gt;

&lt;p&gt;After you have learned the basics of CSS, I would recommend looking at CSS frameworks such as Bootstrap. &lt;/p&gt;

&lt;p&gt;Bootstrap comes in handy when designing websites because it contains pre-made CSS styles that you can use in your website. It helps save you time when you’re on a tight deadline. However, it doesn’t offer as much customization as if you were to design the website yourself using just vanilla CSS. &lt;/p&gt;

&lt;p&gt;It’s important that you understand the syntax and requirements of CSS before utilizing any frameworks. Having a strong foundational knowledge of CSS will enable you to have more control and flexibility when building websites. &lt;/p&gt;

&lt;h2&gt;
  
  
  JavaScript
&lt;/h2&gt;

&lt;p&gt;Finally, we arrive at JavaScript, also known as the scripting language that powers the web. HTML and CSS allow us to build beautiful websites filled with content. However, these websites are static, meaning the user can’t interact with the content on the page. &lt;/p&gt;

&lt;p&gt;This is where JavaScript comes into play. This language gives us functionality and action. JavaScript allows for events to occur when you click a button or submit a form. &lt;/p&gt;

&lt;p&gt;JavaScript is such a big part of web development that every major web browser uses this scripting language. &lt;/p&gt;

&lt;p&gt;JavaScript follows a standard set of rules known as ECMAScript. This standard determines how JavaScript should work in the browser and what updates will be applied annually to the language. &lt;/p&gt;

&lt;h3&gt;
  
  
  Primitive Data Types
&lt;/h3&gt;

&lt;p&gt;There are several data types you should be familiar with when working with JavaScript. They are strings, numbers, Boolean, null, undefined, and objects. &lt;/p&gt;

&lt;p&gt;• Strings are simply a string of text characters, enclosed in quotation marks.&lt;br&gt;
• Numbers are integers, decimals, positive, negative, and NaN values. &lt;br&gt;
• Boolean are true/false statements.&lt;br&gt;
• Null is an intentional empty value.&lt;br&gt;
• Undefined is a variable, array, or object that has not been defined.&lt;br&gt;
• Object is a container of key/value pairs. &lt;/p&gt;
&lt;h3&gt;
  
  
  Variables
&lt;/h3&gt;

&lt;p&gt;Variables are a container for storing data. It’s a method of storing information on a computer that you can later recall or refer to in your code. &lt;/p&gt;

&lt;p&gt;Think of a mason jar that is currently filled with blueberries. The blueberries inside are the data, and the mason jar itself is the variable that is storing the data. &lt;br&gt;
There are two ways of declaring a variable in JavaScript, let &amp;amp; const.&lt;/p&gt;

&lt;p&gt;Use the const method when you have a piece of data that will never change, such as your name. The variable cannot be reassigned.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;myName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Sara&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the let method when you have a piece of data that could possibly change in the future such as the pricing or the weather.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1.99&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Guidelines when naming Variables
&lt;/h3&gt;

&lt;p&gt;Variable names cannot begin with a number. They can contain a number in the name, but they just can’t start with a number.&lt;/p&gt;

&lt;p&gt;Variables are case-sensitive, so pay special attention when creating variables and deciding what letters will be lowercase or uppercase.&lt;/p&gt;

&lt;p&gt;Most developers follow the Camel Casing method, where the first word is lowercase and each additional word afterward is capitalized.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;foodStickerPrice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;3.99&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Logic
&lt;/h3&gt;

&lt;p&gt;A big difference between JavaScript and HTML &amp;amp; CSS is that JavaScript requires the use of logic when building a website. In conditional statements, loops, functions, Boolean values, and comparison operators, you have to implement a certain amount of logic when coding. &lt;/p&gt;

&lt;p&gt;In order to create an interactive website, you have to think about what you want your website to do for the user, and what should cause these actions, or events to occur. &lt;/p&gt;

&lt;p&gt;This involves planning for everything that your user could possibly do and ensuring that you have a plan of action set up to handle user input. &lt;/p&gt;

&lt;p&gt;This is part of what makes JavaScript so much harder to learn and implement in your website. However, with practice comes mastery. Keep trying new things and just see what happens. &lt;/p&gt;

&lt;p&gt;It is far better if you experience the horror of infinite loops and callback hell now, rather than later when you’re working on production code. &lt;/p&gt;

&lt;p&gt;As the old saying goes, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Fall down a hundred times and pick up a hundred lessons.” &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Further Resources
&lt;/h2&gt;

&lt;p&gt;There are plenty of resources available online for learning web development. Don’t feel like you have to rely on just one source to answer all of your questions. &lt;/p&gt;

&lt;p&gt;Most developers have several resources they turn to when dealing with an issue or a difficult concept they don’t understand. Start now and build up a collection of resources that you can turn to when faced with these issues. &lt;/p&gt;

&lt;p&gt;Below is a list of common sites that many developers use and contribute to daily. &lt;/p&gt;

&lt;p&gt;• W3 Schools&lt;br&gt;
• MDN&lt;br&gt;
• Stack Overflow&lt;br&gt;
• Dev Community&lt;br&gt;
• Udemy&lt;br&gt;
• Google&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>html</category>
      <category>css</category>
    </item>
    <item>
      <title>Introduction to CSS</title>
      <dc:creator>Semhar Hidad</dc:creator>
      <pubDate>Thu, 13 Jul 2023 13:36:46 +0000</pubDate>
      <link>https://forem.com/semharhidad/introduction-to-css-40gi</link>
      <guid>https://forem.com/semharhidad/introduction-to-css-40gi</guid>
      <description>&lt;h2&gt;
  
  
  What is CSS?
&lt;/h2&gt;

&lt;p&gt;CSS is an essential part of the three main pillars of front-end web development. HTML is the structure and foundation of the website, the elements that contain the content. CSS is the style and design of the website, color, font, sizing, and layout. Finally, JavaScript is the website’s functionality, buttons, forms, and data processing. &lt;/p&gt;

&lt;p&gt;A common analogy that’s used to explain how the three work together is how a house is built. HTML is the foundation, brick, and mortar, CSS is the paint and interior design, and JavaScript is the electricity and plumbing working when you flip on a light switch or turn on the kitchen sink. &lt;/p&gt;

&lt;p&gt;All three tools work together in creating solid, beautiful functional websites, but it’s helpful to focus on one language at a time, especially when just beginning. &lt;/p&gt;

&lt;p&gt;This guide will focus on CSS, which stands for Cascading Style Sheet and was created in the early 90s. Before CSS, websites relied entirely on poor and limited HTML design. While HTML is vital and provides the content of the site, such as text and images, CSS provides the styling of the content. &lt;/p&gt;

&lt;p&gt;This is why it’s known as a styling language. The first part of the name “cascade” stands for the algorithm that CSS uses when choosing which styling rules to apply and in what order. &lt;/p&gt;

&lt;h2&gt;
  
  
  How to add CSS to a website
&lt;/h2&gt;

&lt;p&gt;As mentioned earlier, CSS is applied to the content in HTML which is contained in an element. An element consists of tags, attributes, and content.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;This is my heading&amp;lt;/h1&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Element = Opening tag, content, and closing tag.&lt;/p&gt;

&lt;p&gt;There are three ways to apply CSS styling to an HTML element: Inline, Internal, and External. &lt;/p&gt;

&lt;h1&gt;
  
  
  H2 Inline
&lt;/h1&gt;

&lt;p&gt;As the name suggests, this method involves applying CSS directly in the same line as the HTML element. CSS is applied as an attribute to the element using the keyword style.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1 style="color:red"&amp;gt;This is my heading&amp;lt;/h1&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;-You apply the CSS style inside the opening tag of the element. &lt;/p&gt;

&lt;p&gt;This method is simple and easy to add, but it’s not recommended for styling the entire website but instead for targeting a single element. &lt;/p&gt;

&lt;h2&gt;
  
  
  Internal
&lt;/h2&gt;

&lt;p&gt;This method involves placing all of the CSS styling rules inside the header section of the HTML file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;head&amp;gt;
    &amp;lt;style&amp;gt;
        h1 {
            color: red;
        }
    &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using this method, you can target multiple elements and apply different styling rules to each. Internal is great when you only need to style a single html file, however, it’s not recommended for targeting multi-page websites. This is because the CSS styling located in the head section of the file only applies to the single html file, and not the rest.     &lt;/p&gt;

&lt;h2&gt;
  
  
  External
&lt;/h2&gt;

&lt;p&gt;This method involves creating an external style sheet, placing CSS styling inside the sheet, and then linking all html files to this sheet. By convention, most developers name this sheet “styles.css”. You can name the file whatever you like as long as the extension ends in CSS. &lt;/p&gt;

&lt;p&gt;To link your HTML files to the style sheet, use the link element with the rel and href attribute. This command tells the file where to pull CSS styling rules from.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link rel="stylesheet" href="style.css"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;-rel represents the relationship and href represents the location of the style sheet.&lt;/p&gt;

&lt;p&gt;This method is recommended in general, but especially when you are working with a multi-page website. Otherwise, you will need to style each page individually and this could lead to unnecessary complexity and inconsistency in your website.&lt;/p&gt;

&lt;h1&gt;
  
  
  H2 Syntax of CSS
&lt;/h1&gt;

&lt;p&gt;The format of CSS styling includes a CSS selector, curly brackets, a property/value relationship separated by a colon, and a semi-colon to end the line of instruction. &lt;/p&gt;

&lt;p&gt;The CSS selector is what we apply the CSS styling to. It can be an element, class, or ID.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;h3 {
    background-color: blanchedalmond;
    font-size: 24px;
    border-radius: 10%;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To use an element as a selector simply type the name of the element&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
    display: grid;
    gap: 20px;
    row-gap: 40px;
    grid-template-columns: 1fr 1fr 1fr 1fr; 
    grid-template-rows: 1fr 1fr;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To use a class as a selector be sure to include a period before typing out the name of the class. Note: The class must be typed exactly as it appears in the HTML file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#intro {
    height: 200px;
    width: 200px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To use an ID as a selector be sure to include a pound sign before typing out the name of the ID. Note: An ID can not begin with a number. &lt;/p&gt;

&lt;h3&gt;
  
  
  Curly Brackets
&lt;/h3&gt;

&lt;p&gt;When using the internal or external method the CSS styling must be contained within a set of curly brackets. &lt;br&gt;
{…}&lt;/p&gt;
&lt;h3&gt;
  
  
  Property/Value
&lt;/h3&gt;

&lt;p&gt;CSS styling rules are stated using a property/value relationship. The pair are separated using a colon.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;color:red;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Color is the property of the element you would like to style and red is the value you would like the element to be.&lt;/p&gt;

&lt;h3&gt;
  
  
  Semi-colon
&lt;/h3&gt;

&lt;p&gt;The semi-colon at the end of the line of instruction is popular in many programming languages. This instructs the computer that there are no more changes to be made and to move on to the next line. &lt;/p&gt;

&lt;h2&gt;
  
  
  CSS Styling Options
&lt;/h2&gt;

&lt;p&gt;Now that we are familiar with how to add CSS to our website and the proper syntax rules of CSS, let’s focus on what we can style with CSS. &lt;/p&gt;

&lt;h3&gt;
  
  
  Colors
&lt;/h3&gt;

&lt;p&gt;CSS allows you to set the color of everything, from the color of the text to the color of the background. There are three ways to annotate colors in CSS syntax. These include Named colors, Hexadecimal, and RGB.&lt;/p&gt;

&lt;p&gt;Named Colors are the easiest method because they allow you to style CSS by simply stating the name of the color. However, there are currently 147 named colors available that most browsers recognize.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;color:blanchedalmond;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hexadecimal Colors are represented in hexadecimal notation, beginning with a pound sign. There are over 16 million color options to choose from.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;color: #874f87;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;RGB stands for red, green, and blue. Each color is represented with a number from 0 to 255 that represents the intensity of each hue. The higher the number the more intense the color.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;color:rgb(73, 124, 23);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  H## Font
&lt;/h1&gt;

&lt;p&gt;The type of font you choose for your website affects the whole mood of your website so it’s vital that you have plenty of options to choose from. CSS gives you lots of flexibility when it comes to styling your font.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;p {
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: 12pt;
font-weight: 700;
font-style: italic;
text-align: center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS offers several different property values that you can set, including font family, size, weight, and style.&lt;/p&gt;

&lt;p&gt;Visit fonts.google.com and choose from thousands of different font styles. Select the font style and copy the link into your HTML file. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m6IzVSFE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oe97pk7qnekr58r1xriz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m6IzVSFE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oe97pk7qnekr58r1xriz.png" alt="Image description" width="281" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This tells your website what font style you have chosen and where to find the font you have selected. &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;CSS is a fantastic styling language that offers you the flexibility and design that your website needs. Now that we have covered the basics of CSS, be sure to stay tuned for future articles where I cover Sizing, Display, Float, Flexbox, Grid, Bootstrap, and more CSS related topics. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>frontend</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
