<?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: Gustavo Assis</title>
    <description>The latest articles on Forem by Gustavo Assis (@gustavo_ax).</description>
    <link>https://forem.com/gustavo_ax</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%2F3424484%2F8f381f0e-f444-41c2-82ee-c5e2d76d55f4.png</url>
      <title>Forem: Gustavo Assis</title>
      <link>https://forem.com/gustavo_ax</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/gustavo_ax"/>
    <language>en</language>
    <item>
      <title>Random topics in HTML.</title>
      <dc:creator>Gustavo Assis</dc:creator>
      <pubDate>Thu, 28 Aug 2025 01:19:23 +0000</pubDate>
      <link>https://forem.com/gustavo_ax/random-topics-in-html-3c5l</link>
      <guid>https://forem.com/gustavo_ax/random-topics-in-html-3c5l</guid>
      <description>&lt;h2&gt;Description lists&lt;/h2&gt;

&lt;p&gt;Used to presenting terms and definitions, like a dictionary. Example:&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;dl&amp;gt;
  &amp;lt;dt&amp;gt;HTML&amp;lt;/dt&amp;gt;
  &amp;lt;dd&amp;gt;HyperText Markup Language&amp;lt;/dd&amp;gt;
  &amp;lt;dt&amp;gt;CSS&amp;lt;/dt&amp;gt;
  &amp;lt;dd&amp;gt;Cascading Style Sheets&amp;lt;/dd&amp;gt;
&amp;lt;/dl&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;Quotes&lt;/h2&gt;

&lt;p&gt;In HTML, quoted elements are used to distinguish quoted text from the surrounding content. You can quote a element using a block or inline.&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;blockquote cite="https://www.ThisIsAExample.org"&amp;gt;
  &amp;lt;p&amp;gt;Show the world&amp;lt;/p&amp;gt;
  &amp;lt;p&amp;gt;your talent&amp;lt;/p&amp;gt;
&amp;lt;/blockquote&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p&amp;gt;
  As I said,
  &amp;lt;q cite="https://www.ThisIsAExample.org"&amp;gt;
     Show the world your talent.
  &amp;lt;/q&amp;gt;
&amp;lt;/p&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just visual:&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;p&amp;gt;— I, &amp;lt;cite&amp;gt;Show the world your talent.&amp;lt;/cite&amp;gt;&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;Abbreviations and Acronyms&lt;/h2&gt;

&lt;p&gt;We can use Abbreviations and Acronyms using the tag &lt;code&gt;&amp;lt;abbr&amp;gt;&lt;/code&gt;. Ex:&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;p&amp;gt;&amp;lt;abbr&amp;gt;HTML&amp;lt;/abbr&amp;gt; is the foundation of the web.&amp;lt;/p&amp;gt;
or
&amp;lt;p&amp;gt;&amp;lt;abbr title="HyperText Markup Language"&amp;gt;HTML&amp;lt;/abbr&amp;gt; is the foundation of the web.&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;Address&lt;/h2&gt;

&lt;p&gt;The contact address element is used to represent contact information for a section on a web page.&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;address&amp;gt;
  &amp;lt;h2&amp;gt;Company Name&amp;lt;/h2&amp;gt;
  &amp;lt;p&amp;gt;
    1234 Not Exist Street &amp;lt;br/&amp;gt;
    New York &amp;lt;br/&amp;gt;
    United States
  &amp;lt;/p&amp;gt;
&amp;lt;/address&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;Time&lt;/h2&gt;

&lt;p&gt;The time element is used to represent a specific moment in time.&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;p&amp;gt;The reservations are for &amp;lt;time datetime="17:00"&amp;gt;17:00 &amp;lt;/time&amp;gt;&amp;lt;/p&amp;gt;
or
&amp;lt;p&amp;gt;
  The graduation will be on &amp;lt;time datetime="2024-06-15T15:00"&amp;gt;June 15&amp;lt;/time&amp;gt;
&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example was taken of freecodecamp. &lt;/p&gt;

&lt;h2&gt;Superscript and Subscript&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p&amp;gt;2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; (2 squared) is 4.&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;CO&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Forms and Tables</title>
      <dc:creator>Gustavo Assis</dc:creator>
      <pubDate>Thu, 28 Aug 2025 01:16:05 +0000</pubDate>
      <link>https://forem.com/gustavo_ax/forms-and-tables-359p</link>
      <guid>https://forem.com/gustavo_ax/forms-and-tables-359p</guid>
      <description>&lt;h1&gt;Forms&lt;/h1&gt;

&lt;p&gt;The form element in HTML is used to gather user information&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;form action="url-goes-here"&amp;gt;
  &amp;lt;!-- input elements go here --&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Action defines where the form data will be sent upon submission. &lt;/p&gt;

&lt;h2&gt;Input&lt;/h2&gt;

&lt;p&gt;We can read the data using Inputs:&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;form action=""&amp;gt;
  &amp;lt;input type="text" /&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can add a Label too:&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;form action=""&amp;gt;
  &amp;lt;label&amp;gt;
    Full Name:
    &amp;lt;input type="text" /&amp;gt;
  &amp;lt;/label&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The input and the label are linked now. We can do that in a explicit way too:&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;form action=""&amp;gt;
  &amp;lt;label for="email"&amp;gt; Email Address: &amp;lt;/label&amp;gt;
  &amp;lt;input type="email" id="email" /&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can add a hint to the user too, using the element placeholder:&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;form action=""&amp;gt;
  &amp;lt;label for="email"&amp;gt; Email Address: &amp;lt;/label&amp;gt;
  &amp;lt;input type="email" id="email" placeholder = "Ex: gustavoassis203@gmail.com"/&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;Button&lt;/h2&gt;

&lt;p&gt;We can have buttons in the forms too:&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;form action=""&amp;gt;
  &amp;lt;label for="email"&amp;gt;Email address:&amp;lt;/label&amp;gt;
  &amp;lt;input type="email" id="email" name="email" /&amp;gt;
  &amp;lt;button type="reset"&amp;gt;Reset form&amp;lt;/button&amp;gt;
  &amp;lt;button type="submit"&amp;gt;Submit form&amp;lt;/button&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or use Input like buttons:&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;input type="button" value="Show Alert" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To submit a form, we can require some information, the form won't be send if the user do not fill the field.&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;input required type="email" name="email" id="email" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In HTML, form controls, like inputs, can be in different stages or conditions like a focused state, readonly state, or disabled state.&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;input disabled type="email" name="email" id="email" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;Fieldset&lt;/h2&gt;

&lt;p&gt;We can group, visually, buttons and inputs, using the tag &lt;code&gt;&amp;lt;fieldset&amp;gt;&lt;/code&gt;, and give to it a legend. Example:&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;form action = ""&amp;gt;
   &amp;lt;fieldset&amp;gt;
      &amp;lt;legend&amp;gt;Here you digit you legend&amp;lt;/legend&amp;gt;
      &amp;lt;!--inputs and buttons--&amp;gt;
   &amp;lt;/fieldset&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;Tables&lt;/h1&gt;

&lt;p&gt;We can use tables in HTML using the &lt;code&gt;&amp;lt;table&amp;gt;&lt;/code&gt; tag. Here a example from freecodecamp:&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;table id="quickfacts"&amp;gt;
  &amp;lt;thead&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;th colspan="2"&amp;gt;Quick Facts: Software Developers, Quality Assurance Analysts, and Testers&amp;lt;/th&amp;gt;
    &amp;lt;/tr&amp;gt;
  &amp;lt;/thead&amp;gt;
  &amp;lt;tbody&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;th&amp;gt;2023 Median Pay&amp;lt;/th&amp;gt;
      &amp;lt;td&amp;gt;
        $130,160 per year
        &amp;lt;br&amp;gt;$62.58 per hour
      &amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;th&amp;gt;Typical Entry-Level Education&amp;lt;/th&amp;gt;
      &amp;lt;td&amp;gt;Bachelor's degree&amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;th&amp;gt;Work Experience in a Related Occupation&amp;lt;/th&amp;gt;
      &amp;lt;td&amp;gt;None&amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;th&amp;gt;On-the-job Training&amp;lt;/th&amp;gt;
      &amp;lt;td&amp;gt;None&amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;th&amp;gt;Number of Jobs, 2022&amp;lt;/th&amp;gt;
      &amp;lt;td&amp;gt;1,795,300&amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;th&amp;gt;Job Outlook, 2022-32&amp;lt;/th&amp;gt;
      &amp;lt;td&amp;gt;25% (Much faster than average)&amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;th&amp;gt;Employment Change, 2022-32&amp;lt;/th&amp;gt;
      &amp;lt;td&amp;gt;451,200&amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
  &amp;lt;/tbody&amp;gt;
  &amp;lt;tfoot&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;th&amp;gt;If this table had a footer it would be here.&amp;lt;/th&amp;gt;
    &amp;lt;/tr&amp;gt;
  &amp;lt;/tfoot&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can see in this example how we can structurate our table. First, we have a head, a body and a footer (&lt;code&gt;&amp;lt;thead&amp;gt;, &amp;lt;tbody&amp;gt;, &amp;lt;tfoot&amp;gt;&lt;/code&gt;). &lt;code&gt;&amp;lt;tr&amp;gt;&lt;/code&gt; define a row, and each row can have a header &lt;code&gt;&amp;lt;th&amp;gt;&lt;/code&gt; and a data &lt;code&gt;&amp;lt;td&amp;gt;&lt;/code&gt;.&lt;br&gt;
My friends, that’s what I wanted to say today. If you’ve read this far and want to know more about me, here is the link to my LinkedIn profile:&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/gustavo-ax/" rel="noopener noreferrer"&gt;LinkedIn-Gustavo-AX&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>LINKS IN HTML.</title>
      <dc:creator>Gustavo Assis</dc:creator>
      <pubDate>Thu, 28 Aug 2025 01:11:54 +0000</pubDate>
      <link>https://forem.com/gustavo_ax/links-in-html-mb6</link>
      <guid>https://forem.com/gustavo_ax/links-in-html-mb6</guid>
      <description>&lt;p&gt;Hello friends, like always, my name I's Gustavo Assis and I'm a Computer Engeneering studant. I made this articles to help you, and help me, to learn about HTML and CSS.&lt;br&gt;
Today, we will see more about HTML.&lt;/p&gt;

&lt;p&gt;LINKS:&lt;br&gt;
I'm talking about The element &lt;code&gt;&amp;lt;link ...&amp;gt;&lt;/code&gt; is used to link the HTML file with external resources like stylesheets, fonts, etc.&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="./styles.css" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stylesheet in one of several arguments, the possible others are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Style and Appearance
stylesheet → Imports an external CSS file.

alternate stylesheet → An alternative style sheet that the user can choose to apply.

2. Site Navigation and Structure
icon → Specifies an icon for the page (favicon).

shortcut icon → Older variant for favicon (today it’s more common to just use icon).

manifest → A JSON file that describes a web application (PWA).

prefetch → Instructs the browser to fetch a resource in advance.

preload → Preloads resources (CSS, fonts, images, etc.) in a controlled way.

prerender → Pre-renders a page in the background for faster navigation.

prev / next → Links sequential documents (like pages in an article).

canonical → Specifies the canonical URL for SEO purposes.

alternate → Links to an alternate version of the content (e.g., different language).

3. Fonts, APIs, and Data
dns-prefetch → Resolves a domain’s DNS before it’s needed.

preconnect → Establishes an early connection to a server.

modulepreload → Preloads JavaScript modules in advance.

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;About the fonts, Google provides code with the links in &lt;a href="https://fonts.google.com" rel="noopener noreferrer"&gt;Google Fonts&lt;/a&gt;, example:&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="preconnect" href="https://fonts.googleapis.com"&amp;gt;
&amp;lt;link rel="preconnect" href="https://fonts.gstatic.com" crossorigin&amp;gt;
&amp;lt;link href="https://fonts.googleapis.com/css2?family=Mozilla+Headline:wght@200..700&amp;amp;display=swap" rel="stylesheet"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An example of icons:&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="icon" href="favicon.ico" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>SVG IN HTML.</title>
      <dc:creator>Gustavo Assis</dc:creator>
      <pubDate>Fri, 15 Aug 2025 19:08:10 +0000</pubDate>
      <link>https://forem.com/gustavo_ax/svg-in-html-5h6i</link>
      <guid>https://forem.com/gustavo_ax/svg-in-html-5h6i</guid>
      <description>&lt;p&gt;Image formats like PNG and JPG are classified as raster formats. These formats are made of a matrix of pixels. The problem with these images is that they don't upscale well — in other words, if you make the image larger, its definition will decrease.&lt;/p&gt;

&lt;p&gt;An SVG is a different kind of image. It is a Scalable Vector Graphic (SVG) and it uses equations to plot the image. In that way, the definition of the image won't change when we change its scale.&lt;/p&gt;

&lt;p&gt;We can use SVG images in HTML with the tag . Example:&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;svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"&amp;gt;
  &amp;lt;circle cx="50" cy="50" r="45" stroke="black" stroke-width="4" fill="yellow" /&amp;gt;
  &amp;lt;circle cx="35" cy="40" r="7" fill="black" /&amp;gt;
  &amp;lt;circle cx="65" cy="40" r="7" fill="black" /&amp;gt;
  &amp;lt;path d="M35 65 Q50 80 65 65" stroke="black" stroke-width="4" fill="transparent" /&amp;gt;
&amp;lt;/svg&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example was taken from the freeCodeCamp website. This code draws a smiling face:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6uvyf36xcu56l8aadzzj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6uvyf36xcu56l8aadzzj.png" alt=" " width="130" height="128"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we know what an SVG is, let's see how we can use it. First, the basic structure is:&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;svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"&amp;gt;
   &amp;lt;!-- Here we make the image --&amp;gt;
&amp;lt;/svg&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's see what means each element:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;xmlns – Specifies the namespace (It's required).

width / height – Defines the display size of the image.

viewBox – Defines the internal coordinate system of the image (minX minY width height).

&amp;lt;!--We can have too:&amp;gt;
preserveAspectRatio – Defines the proportion of the SVG when it scales.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, to make the image we have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Line:
&amp;lt;line x1="10" y1="10" x2="100" y2="100"/&amp;gt;

Rectangle:
&amp;lt;rect x="10" y="10" width="100" height="50"/&amp;gt;

Circle:
&amp;lt;circle cx="50" cy="50" r="40"/&amp;gt;

Ellipse:
&amp;lt;ellipse cx="100" cy="50" rx="50" ry="25"/&amp;gt;

Polygon:
&amp;lt;polygon points="50,5 100,100 0,100" fill="orange"/&amp;gt;

Polyline:
&amp;lt;polyline points="0,40 40,40 40,80 80,80"/&amp;gt;

Path:
&amp;lt;path d="M10 80 C 40 10, 65 10, 95 80"/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The common Attributes for Shapes are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fill – Sets the fill color of the shape.

stroke – Sets the outline (border) color of the shape.

stroke-width – Defines the outline thickness.

opacity – Controls the transparency of the entire shape (0.0 to 1.0).

fill-opacity – Controls transparency only for the fill.

stroke-opacity – Controls transparency only for the outline.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To plot some text:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;x / y – Starting position of the text.

font-family – Font type.

font-size – Text size.

fill – Text color.

text-anchor – Aligns the text (start, middle, end).

Example:
&amp;lt;text x="10" y="50" font-family="Verdana" font-size="20" fill="black"&amp;gt;
  Hello SVG!
&amp;lt;/text&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can add an attribute to a group of images with the tag &lt;code&gt;&amp;lt;g&amp;gt;&lt;/code&gt;:&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;g fill="blue" stroke="black"&amp;gt;
  &amp;lt;circle cx="40" cy="40" r="30"/&amp;gt;
  &amp;lt;rect x="80" y="20" width="50" height="50"/&amp;gt;
&amp;lt;/g&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And we can do tranformation too:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;translate(x, y) – Moves the element.

rotate(angle, cx, cy) – Rotates the element around a point.

scale(sx, sy) – Resizes the element.

skewX(angle) / skewY(angle) – Skews the element horizontally or vertically.

Example:
&amp;lt;rect x="10" y="10" width="50" height="50" transform="rotate(45 35 35)"/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My friends, that’s what I wanted to say today. If you’ve read this far and want to know more about me, here is the link to my LinkedIn profile:&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/gustavo-ax/" rel="noopener noreferrer"&gt;LinkedIn-Gustavo-AX&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>MEDIAS IN HTML</title>
      <dc:creator>Gustavo Assis</dc:creator>
      <pubDate>Fri, 15 Aug 2025 03:26:23 +0000</pubDate>
      <link>https://forem.com/gustavo_ax/medias-in-html-54ph</link>
      <guid>https://forem.com/gustavo_ax/medias-in-html-54ph</guid>
      <description>&lt;p&gt;Hello again my friends! As always, my name is Gustavo, and I'm a Computer Engineering student. I'm writing these articles to help me learn while teaching you at the same time :).&lt;br&gt;
Today, we will see about medias in HTML.&lt;/p&gt;

&lt;h2&gt;IMAGES:&lt;/h2&gt;

&lt;p&gt;To insert an image in HTML, we use:&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;img src="path/filename.format"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can add a description that will be displayed if the image does not load:&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;img src="path/filename.format" alt="Description"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can add a caption to an image too, we do that using the  and  tags:&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;figure&amp;gt;
  &amp;lt;img src="path/filename.format" alt="Description"&amp;gt;
  &amp;lt;figcaption&amp;gt;Put your caption here&amp;lt;/figcaption&amp;gt;
&amp;lt;/figure&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The commands to use in the tag image are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Basic HTML Attributes

src – Specifies the image file URL.

alt – Provides alternative text for accessibility or when the image cannot be displayed.

width – Sets the image width (in pixels or percentage).

height – Sets the image height (in pixels or percentage).

title – Adds a tooltip text shown when hovering over the image.

loading – Controls lazy loading behavior (lazy, eager).

decoding – Suggests how the browser should decode the image (sync, async, auto).

crossorigin – Handles cross-origin requests for the image (anonymous, use-credentials).

referrerpolicy – Controls the Referer header sent when fetching the image.

Responsive &amp;amp; Advanced Image Features

srcset – Defines multiple image versions for different resolutions or devices.

sizes – Specifies which image size should be used in different layouts (with srcset).

usemap – Links the image to an image map (&amp;lt;map&amp;gt;) for clickable areas.

ismap – Indicates the image is part of a server-side image map.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;AUDIOS:&lt;/h2&gt;

&lt;p&gt;To insert audio in HTML we use:&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;audio src = "path/filename.format"&amp;gt;&amp;lt;/audio&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To display the built-in browser controls:&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;audio src = "path/filename.format" controls&amp;gt;&amp;lt;/audio&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In addition of the controls, we can have other options, they are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;autoplay – Starts playing the audio automatically when the page loads.

loop – Makes the audio start over again after it ends.

muted – Starts the audio with the volume set to silent.

preload – Hints how the browser should load the audio file before playback (none, metadata, auto).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&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;audio
  src="audio.mp3"
  loop
  controls
  muted
&amp;gt;&amp;lt;/audio&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can also use nested tags inside :&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;source&amp;gt; – Specifies multiple audio file formats for browser compatibility.

&amp;lt;track&amp;gt; – Adds timed text tracks like subtitles or captions.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&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;audio controls&amp;gt;
  &amp;lt;source src = "audio.ogg" type="audio/ogg"&amp;gt;
  &amp;lt;source src = "audio.wav" type="audio/wav"&amp;gt;
  &amp;lt;source src = "audio.mp3" type="audio/mpeg"&amp;gt;
&amp;lt;/audio&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;VIDEOS:&lt;/h2&gt;

&lt;p&gt;For videos, we use the same approach that we used for audio.&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;video
  src = "path/filename.format"
  loop
  controls
  muted
&amp;gt;&amp;lt;/video&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here a list of the commands to control the video:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;controls – Displays the built-in browser video controls (play, pause, volume, seek bar, fullscreen, etc.).

autoplay – Starts playing the video automatically when the page loads.

loop – Restarts the video automatically when it ends.

muted – Starts the video with sound off.

poster – Sets an image to display before the video starts playing.

preload – Hints how the browser should preload the video (none, metadata, auto).

width – Sets the width of the video display area.

height – Sets the height of the video display area.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&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;video
  src = "path/filename.format"
  loop
  controls
  muted
  poster = "link"
  width = "620"
&amp;gt;&amp;lt;/video&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can add medias from other sites too, we do that using the tag &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt;. The basic structure of this tag is:&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;iframe
  src="video-url"
  width="width-value"
  height="height-value"
  allowfullscreen
&amp;gt;&amp;lt;/iframe&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's see now a list of elements that we can use in it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Basic &amp;lt;iframe&amp;gt; Attributes

src – Specifies the URL of the page to display inside the iframe.

title – Provides an accessible title for the iframe (important for screen readers).

width – Sets the width of the iframe (in pixels or percentage).

height – Sets the height of the iframe (in pixels or percentage).

name – Assigns a name to the iframe so it can be targeted by links or scripts.

loading – Controls how the iframe is loaded (lazy or eager).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My friends, that’s what I wanted to say today. If you’ve read this far and want to know more about me, here is the link to my LinkedIn profile:&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/gustavo-ax/" rel="noopener noreferrer"&gt;LinkedIn-Gustavo-AX&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>EVENTS IN JAVASCRIPT</title>
      <dc:creator>Gustavo Assis</dc:creator>
      <pubDate>Fri, 15 Aug 2025 00:16:52 +0000</pubDate>
      <link>https://forem.com/gustavo_ax/events-in-javascript-3f49</link>
      <guid>https://forem.com/gustavo_ax/events-in-javascript-3f49</guid>
      <description>&lt;p&gt;Hello again! Like always, my name is Gustavo Assis and I'm a Computer Engineering student. I'm writing these articles to help you and me learn about JS.&lt;br&gt;
Events are one of the most important things in JavaScript, because they allow us to use our script to control the page. A list of the events is given ahead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Mouse Events:

click → When the element is clicked.

dblclick → Double click.

mousedown → Mouse button is pressed.

mouseup → Mouse button is released.

mousemove → Mouse moves over the element.

mouseover → Mouse enters the element area.

mouseout → Mouse leaves the element area.

contextmenu → Right-click (context menu).

2. Keyboard Events:

keydown → When a key is pressed.

keypress → When a key is pressed and held (deprecated in some browsers).

keyup → When a key is released.

3. Form Events:

submit → When a form is submitted.

reset → When a form is reset.

focus → When a field gains focus.

blur → When a field loses focus.

change → When the value of a field changes.

input → When the value of a field changes (in real time).

4. Window and Document Events:

load → When the page or a resource finishes loading.

DOMContentLoaded → When the HTML is loaded and parsed

resize → When the browser window is resized.

scroll → When the page or an element is scrolled.

unload → When the user leaves the page.

5. Drag &amp;amp; Drop Events:

dragstart → When dragging starts.

drag → While dragging.

dragend → When dragging ends.

dragenter → When entering a drop target area.

dragover → While over a drop target.

dragleave → When leaving a drop target area.

drop → When an element is dropped in a target area.

6. Touch Events (Mobile)

touchstart → When a finger touches the screen.

touchmove → When a finger moves on the screen.

touchend → When a finger is lifted.

touchcancel → When a touch is interrupted.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, we will see some examples of how to use them. &lt;br&gt;
Let's suppose that in the body of our HTML we have a button onclick. We want the button to call a function in our script when it is pressed to handle the event. We will name the function "clickEvent", so in our HTML we have:&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;button onclick = "clickEvent()"&amp;gt;Click here&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In our script, we can handle the click:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function clickEvent() {
   alert("Hello World");
   // We can do many other things here.
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let's see an example where we change the style of an element. In our HTML:&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;!-- A blue box in the center of the image--&amp;gt;
&amp;lt;div id = "box" 
     onmouseover = "onmouseoverEvent()" 
     style = "margin: auto; width: 60%; height: 150px; background: blue;"&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In our JavaScript, let's change the color of the background:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function onmouseoverEvent() {
   let div = document.getElementById("box");
   div.style.backgroundColor = "red";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, when we pass the mouse over the blue box, it becomes red. The box will remain red when the mouse leaves the box, because we only handle when the mouse enters the box, and not when it leaves. So, let's handle when the mouse leaves the box (the box has to become blue again), to do that, we will use the "onmouseout" event, now our HTML becomes:&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;div id="box" 
     onmouseover = "onmouseoverEvent()" 
     onmouseout = "onmouseoutEvent()" 
     style="margin: auto; width: 60%; height: 150px; background: blue;"&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And our JavaScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function onmouseoverEvent() {
   let div = document.getElementById("box");
   div.style.backgroundColor = "red";
}

function onmouseoutEvent() {
   let div = document.getElementById("box");
   div.style.backgroundColor = "blue";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, the box turns red when the mouse enters it, and blue when the mouse leaves.&lt;br&gt;
My friends, that’s what I wanted to say today. If you’ve read this far and want to know more about me, here is the link to my LinkedIn profile:&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/gustavo-ax/" rel="noopener noreferrer"&gt;LinkedIn-Gustavo-AX&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>INTRODUCTION TO HTML, CSS AND JAVASCRIPT</title>
      <dc:creator>Gustavo Assis</dc:creator>
      <pubDate>Mon, 11 Aug 2025 21:10:20 +0000</pubDate>
      <link>https://forem.com/gustavo_ax/introduction-to-html-css-and-javascript-51gi</link>
      <guid>https://forem.com/gustavo_ax/introduction-to-html-css-and-javascript-51gi</guid>
      <description>&lt;p&gt;    Hello everybody, &lt;br&gt;
    My name is Gustavo de Assis, and I'm a Computer Engineering student. I recently started studying HTML, CSS, and JavaScript to improve my skills, and I decided to create this post for two reasons: first, to share my knowledge, and second, to help me learn (yeah, teaching is one of the best ways to study).&lt;/p&gt;

&lt;h3&gt;WHAT IS HTML &amp;amp; CSS?&lt;/h3&gt;

&lt;p&gt;    Well, in a very simple way, we can say that HTML and CSS are the foundation of web pages. HTML contains the content and structure of the page, while CSS defines how this content is displayed — in other words, the style of the page.&lt;/p&gt;

&lt;h3&gt;WHAT IS HTML &amp;amp; JAVASCRIPT?&lt;/h3&gt;

&lt;p&gt;    JavaScript is a programming language, like C, C#, or Java. It is the main language used to add interactivity to websites.&lt;/p&gt;

&lt;h3&gt;HOW JAVASCRIPT IS USED IN WEBSITES?&lt;/h3&gt;

&lt;p&gt;    We already said that HTML and CSS make up the structure and style of a page, but what if we need interaction? Not just simple interactions (which can be done with HTML and CSS alone), but more complex behaviors. For that, we need logic — and that logic is written in JavaScript.&lt;/p&gt;

&lt;h3&gt;BASIC STRUCTURE:&lt;/h3&gt;

&lt;p&gt;    We can write HTML with inline styles and scripts, but it’s better to keep each part in separate files: one for HTML, one for CSS, and one for JavaScript. The basic HTML structure, which links the other files, looks like this:&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;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;
    &amp;lt;link rel="stylesheet" href="style.css"&amp;gt;
    &amp;lt;!--remaining code--&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;!--remaining code--&amp;gt;
    &amp;lt;script src="script.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;MAIN TAGS (FOR BEGINNERS LIKE ME):&lt;/h3&gt;

&lt;p&gt;    Well, it's not recent news that HTML has hundreds of tags, and probably you or I won't know all of them, then what? I think that we just have to know the basics, if we need to do a specific thing we just have to search on the internet, or just ask an AI. So why learn the basics? Well, you have a base to learn more specific things, we can't just skip stages.&lt;br&gt;
    Here are some common tags I use (still very basic, but useful):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;: defines a paragraph.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; to &lt;code&gt;&amp;lt;h6&amp;gt;&lt;/code&gt;: heading tags, we use them for titles. For example, we can do a title typing: &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; This is a big title &lt;code&gt;&amp;lt;/h1&amp;gt;&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt;: well, I won't explain the differences between these two tags. But I can say that both are container tags — in other words, everything inside is grouped together. Containers are one of the most important features of HTML, because with them we can style pages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt;: denotes a list.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt;: denotes an item of the list&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;    With just these tags, we can already make a simple website. HTML provides the information, but how that information is displayed — centered, aligned, with colors and fonts — is defined in the CSS file.&lt;/p&gt;

&lt;p&gt;    It's important to say that we can assign classes or IDs to our tags. This allows us to change the style of specific tags in the CSS file. An example:&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;div class="class_example"&amp;gt; &amp;lt;/div&amp;gt;
&amp;lt;div id="id_example"&amp;gt; &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;MAIN COMMANDS TO CSS:&lt;/h3&gt;

&lt;p&gt;    To start, we need to know just a few things. In this post, we will see how to change the background color of parts of the site, the color of texts, and how to align texts and boxes (we will see what that is ahead). &lt;br&gt;
    To change the style of the pages and your data, we need "select" what we are changing. To do that, we write the name of the tag, id or class and we open a scope with "{}", like in an example below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;h1{
    color: #ffffff;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    To change the style of specific tag, given by a class or id, we use a . before the name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.class_example{
    color: #ffffff;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    To select everything in a page, we use *:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*{
    color: #ffffff;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    Now, here are some common commands that I use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;color: #ffffff; /* Change the text color */
font-size: 1.5rem; /* Change the font size */
font-family: 'Times New Roman', Times, serif; /* Change the font family */
font-weight: 300; /* Change the font thickness */
text-align: center; /* Align text to the center of its region */ 
background-color: #ffffff; /* Change the background color */
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;FLEXBOX IN CSS:&lt;/h3&gt;

&lt;p&gt;    One of the most important features of CSS is Flexbox — with it, we can style our site in many ways. It's a complex feature, so I won't discuss it here, but I'm leaving a link to an explanation of how it works: &lt;a href="https://www.alura.com.br/curso-online-html-css-classes-posicionamento-flexbox?srsltid=AfmBOor-nw4AJTGCqUcaLRGM4NIQ0DzyAXKi18Hx_X1wW53aYahbQ80c" rel="noopener noreferrer"&gt;FlexBox&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;JAVASCRIPT:&lt;/h3&gt;

&lt;p&gt;    Like we saw before, JavaScript is a programming language we use to make websites. We already saw how to link it to an HTML file. Now, let's see the main commands of this language and how to change HTML &amp;amp; CSS elements with JS code.&lt;/p&gt;

&lt;p&gt;Variable declaration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const a; // Local scope. We can't change its value.
let b;   // Local scope. We can change its value.
var c;   // Function scope. We can change its value, but we really shouldn't use it
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    It's important to say that JS is not a strongly typed language — we can declare a variable called "a", assign a string to it, and later assign a number, for example.&lt;/p&gt;

&lt;p&gt;    To print something in the console, we use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log("What do you want to print?");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;VECTORS IN JAVASCRIPT:&lt;/h3&gt;

&lt;p&gt;    To start, we need to know that JavaScript doesn't have fixed sizes for arrays, in other words, they can increase or decrease size accordingly to what we need.&lt;br&gt;
    When we declare a vector we can start it empty and when we want we add elements in it, or, we can create it with data. First, let's see how we declare it empty:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let names = [];
names[0] = "Gustavo";
names[1] = "Ana";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    Now, to declare it with data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let numbers = [1, 2, 3, 4, 5];
let fruits = ["apple", "banana", "orange"];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    We can create a vector using a constructor too:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let fruits = new Array("apple", "banana", "orange");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    Our vector can have different types too:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let different = [1, "text", true, { name: "Gustavo" }];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    To access an element of the vector, we can do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let a = fruits[1];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    The main methods to use in the vector are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;arr.push(4);   // add to the end
arr.pop();     // remove from the end
arr.unshift(0); // add to the beginning 
arr.shift();   // remove from the beginning 
arr.slice(1, 3); // returns [2, 3] (doesn't change original)
arr.concat([4, 5]); // returns merged array
arr.splice(1, 2); // remove 2 elements starting from index 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;OPERATORS IN JAVASCRIPT:&lt;/h3&gt;

&lt;p&gt;    I won't show all operators of JS, because they are very similar to operators from other languages. We just have to pay attention to the equality operator: "==" can return true when comparing different data types. To compare both type and value, use "===". &lt;/p&gt;

&lt;h3&gt;LOOPS IN JAVASCRIPT:&lt;/h3&gt;

&lt;p&gt;    First, we have the common for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for (let i = 0; i &amp;lt; 5; i++) {
  console.log(i); // 0, 1, 2, 3, 4
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    We can use this "for" to interact in arrays, like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let arr = [1, 2, 3];
for (let i = 0; i &amp;lt; arr.length; i++) {
  console.log(arr[i]);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    We here use a property of Arrays, more specifically when we get how many elements are in the array (arr.length).&lt;/p&gt;

&lt;p&gt;    To interact in arrays, we can use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let fruits = ["apple", "banana", "orange"];

for (let fruit of fruits) {
  console.log(fruit);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    The FOR...IN in JavaScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let person = { name: "Gustavo", age: 22 };

for (let key in person) {
  console.log(key, person[key]);
  // name Gustavo
  // age 22
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    And the FOR EACH:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let numbers = [1, 2, 3];

numbers.forEach((value, index) =&amp;gt; {
  console.log(index, value);
});

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    We have many other interesting features in JS to use in Arrays, like "map" and "filter", but, it's more advanced material, so we will see that on another occasion. &lt;/p&gt;

&lt;h3&gt;FUNCTION IN JS:&lt;/h3&gt;

&lt;p&gt;    Functions are a way to do the same part of a code several times, without having to repeat the code, we just have to call the function. We can make a function in several forms, the most common forms are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function sum(a, b) {
  return a + b;
}
console.log(sum(2, 3)); // 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    The "best" way to do it(for some reason that I won't discuss here):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const sum = function(a, b) {
  return a + b;
};
console.log(sum(5, 2)); // 7
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    Or in an arrow form (to do simple functions):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const mul = (a, b) =&amp;gt; a * b;
console.log(mul(3, 4)); // 12
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;CLASSES AND OBJECTS IN JS:&lt;/h3&gt;

&lt;p&gt;    To create a class we use the keyword class:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Person{

  constructor(name, age) {
    this.name = name;
    this.age = age;
  }

  // Methods:
  show() {
    console.log(`Hello, my name is ${this.name} and I am ${this.age} years old.`);
  }

  // ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    And to create an Object of this class and call a method we use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const person1 = new Person("Gustavo", 22);
person1.show(); 
// Output: Hello, my name is Gustavo and I am 22 years old.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;JAVASCRIPT AND HTML &amp;amp; CSS:&lt;/h3&gt;

&lt;p&gt;    Now we already know the basics of JS, but how we use it in our website? Well, with our JS file, we change the DOM, but it's not important right now. We just have to know that we can use commands to change the other commands (in the HTML and CSS files).     For example, let's consider that in our HTML file we have:&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;p id="message"&amp;gt;Text&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    And in our Script we have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;document.getElementById("message").innerHTML = "Text changed!";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    Our site now will show: "Text changed!"&lt;br&gt;
    In the same way we can change the color or the font of the site:&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;script&amp;gt;
document.getElementById("message").style.color = "red";
document.getElementById("message").style.fontSize = "20px";
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;    Using that, we can do many things. For example, we can make buttons with HTML and CSS, take the return of them in our Script, and make the changes in the site when they are pressed.&lt;/p&gt;

&lt;h3&gt;THE END.&lt;/h3&gt;

&lt;p&gt;    Well, I know I didn't show many things, but this is just an introduction to these languages. We can learn so much more from other sources. The truth is I made this page more to help myself than you, because writing helps me study. I’ll probably write about React soon. If you read this far and want to know me more, here is the link to my LinkedIn profile:&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/gustavo-ax" rel="noopener noreferrer"&gt;LinkedIn-Gustavo-AX&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
