<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Code Refresh. - Medium]]></title>
        <description><![CDATA[Sharing code and whatever goes with it. - Medium]]></description>
        <link>https://medium.com/code-refresh?source=rss----c7881f627f59---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Code Refresh. - Medium</title>
            <link>https://medium.com/code-refresh?source=rss----c7881f627f59---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 13 Nov 2026 06:28:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/code-refresh" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Setting Up The CSS File]]></title>
            <link>https://medium.com/code-refresh/setting-up-the-css-file-af56430552fb?source=rss----c7881f627f59---4</link>
            <guid isPermaLink="false">https://medium.com/p/af56430552fb</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[code-refresh]]></category>
            <category><![CDATA[learn-to-code]]></category>
            <category><![CDATA[html-css]]></category>
            <category><![CDATA[website]]></category>
            <dc:creator><![CDATA[Project Code Refresh]]></dc:creator>
            <pubDate>Fri, 25 Jan 2019 11:41:00 GMT</pubDate>
            <atom:updated>2019-01-25T11:49:07.016Z</atom:updated>
            <content:encoded><![CDATA[<p>Before you start with this article, make sure you have a HTML file set up. Setting up a HTML file is easy. To write HTML code you need to have a text editor that supports syntax highlighting. I would suggest you start with <a href="https://www.sublimetext.com/">Sublime Text editor</a>. You can also use Notepad++ or <a href="http://brackets.io/">Brackets</a>.</p><p>Create a new directory and create a new text file with a .html extension. Name it “index.html”. You can name it any file you desire, but there is a reason why most developers use index as the name and you will know the reason later in this article. Once you have created a HTML file, type in the HTML structure inside it.</p><p>The structure is as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/153308d4d0338b04ae6502772c425cb1/href">https://medium.com/media/153308d4d0338b04ae6502772c425cb1/href</a></iframe><p>Here, the “!DOCTYPE html” declares the type of file. Next we have the html element that will hold everything else of your html file. The head and body elements are indented inside it. The head holds all the necessary information about your file and the body holds the structure that will be visible on your webpage.</p><p>The head includes some basic information, which is again a must for most HTML files as displayed below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2a4b64e704935397be1d0afdb44be19c/href">https://medium.com/media/2a4b64e704935397be1d0afdb44be19c/href</a></iframe><p>Skipping the meta element for now, lets talk about title. Whatever text the title element holds is displayed as the heading or most probably, the name of your page. It is the text which you can read on your browser tab. This text varies page to page.</p><p>The link element is explained in this article further. Further comes the body, where you can use the previously discussed elements like &lt;h1&gt; or &lt;h6&gt; to with both the starting and ending tags to write anything on the webpage.</p><p>Try writing something like this in the body:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ab968a4eaba13727293ff0b421710c23/href">https://medium.com/media/ab968a4eaba13727293ff0b421710c23/href</a></iframe><p>Now save this file and open the index.html file on any browser you like (or just drag the file to any open browser tab). You just wrote a basic and most probably your very first HTML code. Congrats!</p><p>This structure is a must for every HTML file and it is not valid without the exact format as described above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EU9eyvZ_DnWezgvNyAff1A@2x.png" /></figure><p>Now that you understand the basic characteristics of HTML and CSS, you need to know how to bring these together. HTML alone does not look good and your webpage might just not get noticed by internet surfers. While CSS is just nothing without HTML.</p><p>There are several ways you can attach your CSS file to the HTML file. This process is known as CSS referencing and I am discussing one way to make your CSS shine on your HTML which is used by most developers.</p><p>The best practice is to create a separate file for CSS and write all the design code in it. This external file or sheet can be easily referenced in the head section of the HTML file to make the code communicate. Using a single sheet can also help you maintain a consistency of style throughout your website.</p><p>Your website might have more than one page and referencing the same CSS file will help you applying the default style of your website throughout all pages without typing new CSS for every new page.</p><p>To create a CSS file, we can follow the same process of creating a HTML file, but now save it with a .css extension. Now, the best practice is to save our CSS file in the same folder as that of the HTML file. Most developers use the name <em>main.css </em>to name the main CSS file of the website.</p><p>Now coming to the actual referencing, we can use the &lt;link&gt; element to define a path to get the code of our CSS file. Now to link the CSS, we use the attribute rel and assign the value of “stylesheet” to it. Finally we put the href</p><p>attribute to state the location of our CSS file.</p><p>Here is an example of the &lt;head&gt; of a document to reference your style file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b9068de446c1948814b5303423b591b4/href">https://medium.com/media/b9068de446c1948814b5303423b591b4/href</a></iframe><p>If your CSS file is placed in some other folder than the one where your HTML is kept, make sure your href is updated with the right path. If say you have stored it in the “styles” subdirectory, write the value in href like this style/main.css.</p><p>There are other ways of referencing CSS like inline CSS, which you can read on the internet, but is not a preferred option.</p><p>If you have reached this far, your CSS is now talking to HTML and now the only thing to see forward is how to start a CSS file. By now, you might have seen that HTML has a default style set to it. If you haven’t, try dragging your HTML file to a blank browser tab.</p><p>Now it is important for you to realise that this default style is not given to it by your file or computer but by your browser. The default style varies browser to browser and before we start styling our webpage, we must bring the page to a standard style that will be equivalently displayed on all browsers out in the market. There are more browsers in the market than you think you know. To create a good user experience and to make sure that all of your audience looks at the same website, we use resets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zd9AoUd6_siaGZd2FA-C6w@2x.png" /></figure><p>For this purpose, we use what is known as CSS Resets. These resets define an unified style for all browsers. Because CSS code sets itself up or reads from top to bottom, it is important that we use the resets before any styling we apply.</p><p>There are several resets available out there, all of which have their own way of unifying your HTML result. One of the most popular resets and the one that I use mostly is the one by Eric Meyer. You can also use Normalize.css by Nicolas Gallagher.</p><p>Now to actually set up your CSS file, create a new file in the folder that contains your index.html file and name it main.css. Open the main.css file with your text editor and the first thing you write on it should be the CSS reset.</p><p>Here is the reset from <a href="https://meyerweb.com/eric/tools/css/reset/">Eric Mayer</a>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fac95168d83c7326a004ce1ff83674aa/href">https://medium.com/media/fac95168d83c7326a004ce1ff83674aa/href</a></iframe><p>Once you are done, save the CSS file and now open the index.html file in your browser. It is most probable that your webpage looks a bit different now and also more unified.</p><p>This is where you can say that you know how HTML and CSS works. You haven’t seen much of CSS yet and there is a lot to come ahead.</p><p>If you liked what you read, maybe clap for it. Thank you.</p><p>And yes, here is why we developers name the starting HTML file as index.html. When you are done with developing a complete website, you will need to upload the files onto a web server that will help you go online and people around the globe will be able to see it. Now, your website might have many HTML files and you will need to upload them all to the server. It is a basic character of the servers to take your index.html as the starting for your website, what we know as the home page which your website visitors will see first. This characteristic of the servers help in eliminating any confusion of how a website will be presented to anyone.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af56430552fb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/code-refresh/setting-up-the-css-file-af56430552fb">Setting Up The CSS File</a> was originally published in <a href="https://medium.com/code-refresh">Code Refresh.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting to know web pages, HTML & CSS]]></title>
            <link>https://medium.com/code-refresh/getting-to-know-web-pages-html-css-ee2f7e99d3ef?source=rss----c7881f627f59---4</link>
            <guid isPermaLink="false">https://medium.com/p/ee2f7e99d3ef</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[html-css]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[course]]></category>
            <dc:creator><![CDATA[Project Code Refresh]]></dc:creator>
            <pubDate>Mon, 04 Jun 2018 12:02:25 GMT</pubDate>
            <atom:updated>2019-01-25T11:48:07.273Z</atom:updated>
            <content:encoded><![CDATA[<p>Imagine a time before the internet. There was nothing called a website and books, journals and magazines all printed on paper were the primary source of information for everyone.</p><p>Today, our lives without the internet is an unimaginable situation. Everything we do is connected with the web and the huge lot of information on it. Anytime you want, you can just hop onto your favorite search engine and just scroll and click away between hundreds and thousands of websites.</p><blockquote>And chances are someone somewhere has built a website with your exact search in mind.</blockquote><p>I am going to show how to build your own websites using two of the most prominent computer languages — HTML &amp; CSS.</p><p>HTML and CSS make up all the websites that you see. But, it is very important to understand these two languages, the differnce between them and the syntax of the two languages to put up a meaningful website.</p><p>HTML and CSS are languages that are mostly used by the front-end developers. To know more about front-end and back-end web development, you can see these articles by UpWork:</p><p><a href="http://A Beginner’s Guide to Front-End Development">A Beginner’s Guide to Frontend Development</a></p><p><a href="https://www.upwork.com/hiring/development/a-beginners-guide-to-back-end-development/">A Beginner’s Guide to Back-End Development</a></p><p><a href="https://www.upwork.com/hiring/for-clients/frontend-vs-backend-web-development/">Frontend vs Backend Web Development</a></p><h3>What are HTML &amp; CSS?</h3><p>HTML, Hyper Text Markup Language is what represents the content of your websites. The headings, paragraphs, images, buttons are all written with HTML. But only putting them up doesn’t mkae sense. You need to put them in a specific way and style them up to get everyone’s attention. You need to make your website stand out of the thousands and thousands of other similar ones.</p><p>CSS is Cascading Style Sheets. Yeah, even its name has <strong><em>style. </em></strong>CSS makes your websites beautiful. They change the way your headings, paragraphs, images and every other content appear on browsers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9M-3suLnrv5UaR1CleX8tQ@2x.png" /></figure><p>HTML and CSS are always separate and they cannot be written in each other’s files. Both these languages are made up of a few basic terms and they need to be known to start writing the code.</p><h3>Common HTML Terms</h3><h4>Elements</h4><p>Elements define the contents within a page. Elements are what represents the headings, paragraphs, images, etc. The most common elements include the multiple levels of headings from &lt;h1&gt; to &lt;h6&gt;, paragraphs &lt;p&gt; and many more.</p><p>Elements are identified by the use of less-than and greater-than angle brackets, &lt; &gt;, surrounding the element name.</p><h4>Tags</h4><p>Tags most commonly occur in pairs of opening and closing tags. The opening tag begins an element and a closing tag ends it.</p><p>An opening tag is represented by only the less-than and greater-than arrows, whereas the closing tag also has a forward-slash after the less-than arrow.</p><p>They are written as:</p><pre>&lt;a&gt;...&lt;/a&gt;</pre><p>The different parts of the webpages are mostly made up of tags.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oPD4MeOgkJHT7tKuwyO6TA.jpeg" /><figcaption>Tags</figcaption></figure><h4>Attributes</h4><p>Attributes are different properties that are used to provide more information about each tag. The very common attributes include the class attribute and the<em> </em>id<em> </em>attribute.</p><p>The class attribute, classifies an element and the id attribute, identifies an element. The src attribute, specifies a source for embeddable content; and the href attribute, provides a hyperlink reference to a linked resource.</p><p>Attributes are written within the opening tag and after the tag name. The attribute name is followed by an equal to sign and then a quoted attribute value.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4099d5d5ca103ed3bf07cc84b294828e/href">https://medium.com/media/4099d5d5ca103ed3bf07cc84b294828e/href</a></iframe><p>The above code will display the text <strong>Google </strong>and it will be acting as a link to <strong>google.com</strong>. Here hrefstands for <em>Hyperlink Reference.</em></p><h3>Common CSS Terms</h3><h4>Selectors</h4><p>A selector designates exactly which element or elements within our HTML to target and apply styles to. Selectors can be written with many different qualifiers to specify exactly what we want to style. We may want to style one paragraph or all the paragraphs.</p><p>Selectors target the type, class or id. Selectors are written by writing the selector name followed by curly brackets {}, which includes all the styles that we wish to apply.</p><pre>p {...}</pre><p>Common selectors are of three types. It is important to fully understand how to use selectors and how they can be leveraged.</p><p><strong>Type Selectors: </strong>Type selectors target elements by their element type. Like, if we want to select all paragraph elements, we can write a CSS selector like this:</p><pre>p {...}</pre><p>This CSS selects the following HTML:</p><pre>&lt;P&gt;...&lt;/p&gt;<br>&lt;p&gt;...&lt;/p&gt;</pre><p><strong>Class Selectors: </strong><em>Class</em> selectors allow us to select an element based on the element’s class attribute value.</p><p>Class selectors help us in selecting elements more specifically. We can specify the paragraphs we want to select and not select all paragraphs.</p><p>To write a class selector in CSS,we need to put a period before the class attribute value. For example, if we want to select all elements with the class attribute value of <em>awesome</em>,<em> </em>we first add the class attribute in HTML to the desired elements to be styled like this</p><pre>&lt;p class=&quot;awesome&quot;&gt;...&lt;/p&gt;<br>&lt;h1 class=&quot;awesome&quot;&gt;...&lt;h1&gt;</pre><p>Then we add the CSS like this:</p><pre>.awesome {...}</pre><p>Any element with <em>awesome </em>attribute value is now selected and styled accordingly.</p><p><strong>ID Selectors: </strong>ID selectors are even more precise than class selectors, as they target only one unique element at a time.</p><p>To write an ID selector in CSS, we use a hash before the id attribute value.</p><p>Similar to class selectors, we have to add an id attribute to the HTML element we want to style alone, like this:</p><pre>&lt;p id=&quot;learn&quot;&gt;...&lt;/p&gt; </pre><p>Then, we add css like this:</p><pre>#learn {...}</pre><p>Now, let’s continue to the next few common CSS terms.</p><h4>Properties</h4><p>A property determines the styles that will be applied to that element. Properties are written within the curly brackets, that define what kind of property is to be modified, like color, size, etc.</p><p>There are numerous properties we can use, such as background, color, font-size, height, and width, and new properties are often added. The property name is always immediately followed by a colon, : <em>.</em></p><pre>p {<br>  color: ...;<br>  font-size: ...;<br>}</pre><h4>Values</h4><p>Now, to actually modify the style, we have to set the desired values to the properties.</p><p>Here we are selecting all &lt;p&gt; elements and setting the value of the color property to be red and the value of the font-size property to be 16 pixels.</p><pre>p {<br>  color: red;<br>  font-size: 16px;<br>}</pre><p>The values are always followed by a semi-colon, ; and is very important because without a semi-colon, the code will be completely invalid and nothing will work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*lMVVmb8T6mQWyqrWq5ADyA.jpeg" /><figcaption>CSS Syntax Outline</figcaption></figure><p>To know more CSS terms and definitions, you can visit this article by Impressive Webs: <a href="https://www.impressivewebs.com/css-terms-definitions/">CSS Terms and Definitions</a>.</p><p>________________________________________</p><p>We will further see how to attach HTML and CSS and will also create a document to work on.</p><p>________________________________________</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee2f7e99d3ef" width="1" height="1" alt=""><hr><p><a href="https://medium.com/code-refresh/getting-to-know-web-pages-html-css-ee2f7e99d3ef">Getting to know web pages, HTML &amp; CSS</a> was originally published in <a href="https://medium.com/code-refresh">Code Refresh.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>