<?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>DEV Community: Jhosep</title>
    <description>The latest articles on DEV Community by Jhosep (@monkdev).</description>
    <link>https://dev.to/monkdev</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%2F733683%2F46201d0a-2c8b-4909-8f41-f1ce893d5648.jpg</url>
      <title>DEV Community: Jhosep</title>
      <link>https://dev.to/monkdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/monkdev"/>
    <language>en</language>
    <item>
      <title>Semantic HTML</title>
      <dc:creator>Jhosep</dc:creator>
      <pubDate>Mon, 04 Sep 2023 03:49:59 +0000</pubDate>
      <link>https://dev.to/monkdev/semantic-html-2kb0</link>
      <guid>https://dev.to/monkdev/semantic-html-2kb0</guid>
      <description>&lt;p&gt;Semantic HTML is a coding practice that involves using HTML elements not just for their presentational qualities but for their underlying meaning and purpose. Leveraging semantic HTML can greatly benefit your website's accessibility, search engine optimization (SEO), and overall structure. Here's why it's important and how to use it effectively :&lt;/p&gt;

&lt;p&gt;1- Accessibility : Semantic HTML improves accessibility by providing meaningful structure and context to web content. Screen readers and assistive technologies rely on these semantic elements to understand and navigate web pages effectively.&lt;/p&gt;

&lt;p&gt;2- SEO (Search Engine Optimization) : Search engines like Google and Bing use semantic HTML to better understand the content and structure of your web page. Using semantic elements can positively impact your site's search engine ranking.&lt;/p&gt;

&lt;p&gt;3- Key Semantic Elements : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; : Represents the introductory content or a set of navigational links at the top of a web page.&lt;/li&gt;
&lt;li&gt; : Defines a section with navigation links, typically for site menus.&lt;/li&gt;
&lt;li&gt; : Represents the main content of the document. Use it once per page.&lt;/li&gt;
&lt;li&gt; : Defines a thematic grouping of content within a document.&lt;/li&gt;
&lt;li&gt; : Represents a self-contained composition in a document, such as a blog post, news article, or forum post.&lt;/li&gt;
&lt;li&gt; : Contains content that is tangentially related to the content around it, like sidebars or advertisements.&lt;/li&gt;
&lt;li&gt; : Represents the footer of a section or the whole page, often containing copyright information, contact details, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;4- Heading Elements : Use "&lt;/p&gt;
&lt;h1&gt;" for the main heading of your page. Subsequent headings should follow a logical hierarchy, such as "&lt;h2&gt;", "&lt;h3&gt;", etc., to represent sub-sections.&lt;br&gt;
Avoid skipping heading levels, as this can confuse both users and search engines.

&lt;/h3&gt;
&lt;/h2&gt;
&lt;/h1&gt;
&lt;p&gt;5- Semantic Inline Elements : Elements like "&lt;em&gt;" (emphasis) and "&lt;strong&gt;" (strong importance) should be used for their semantic meaning rather than purely for styling. Screen readers interpret these elements accordingly.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;6- ARIA Roles : Use ARIA (Accessible Rich Internet Applications) roles to enhance the semantics of non-semantic elements like "&lt;/p&gt;" and "&lt;span&gt;" when building complex web applications.

&lt;p&gt;7- Validation : Always validate your HTML code using a tool like the W3C Markup Validation Service to ensure your markup adheres to HTML standards.&lt;/p&gt;

&lt;p&gt;8- Stay Updated : Stay informed about evolving HTML standards and best practices to ensure your code remains semantic and accessible.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;! - Semantic Inline Elements --&amp;gt;
&amp;lt;p&amp;gt;Use &amp;lt;em&amp;gt;emphasis&amp;lt;/em&amp;gt; when needed, and &amp;lt;strong&amp;gt;
strong importance‹/strong&amp;gt; when necessary.‹/p&amp;gt;
&amp;lt;! -- ARIA Roles
&amp;lt;div role="button" tabindex="'0"'›Click me&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;Semantic HTML not only makes your web content more accessible and SEO-friendly but also contributes to better code maintainability and readability. By using these elements thoughtfully, you're not only improving the user experience but also future-proofing your web projects.&lt;/p&gt;

&lt;/span&gt;

</description>
      <category>html</category>
      <category>frontend</category>
      <category>css</category>
      <category>developer</category>
    </item>
    <item>
      <title>Const Assertion</title>
      <dc:creator>Jhosep</dc:creator>
      <pubDate>Thu, 24 Aug 2023 05:49:58 +0000</pubDate>
      <link>https://dev.to/monkdev/const-assertion-1af6</link>
      <guid>https://dev.to/monkdev/const-assertion-1af6</guid>
      <description>&lt;p&gt;Strive to use const assertion (as const):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;type is narrowed&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;object gets readonly properties&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;array becomes readonly tuple&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;let's see 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;// ❌ Avoid declaring constants without const assertion
const BASE_LOCATION = { x: 50, y: 130 }; // Type { x: number; y: number; }
BASE_LOCATION.x = 10;
const BASE_LOCATION = [50, 130]; // Type number[]
BASE_LOCATION.push(10);

// ✅ Use const assertion
const BASE_LOCATION = { x: 50, y: 130 } as const; // Type '{ readonly x: 50; readonly y: 130; }'
const BASE_LOCATION = [50, 130] as const; // Type 'readonly [10, 20]'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>typescript</category>
      <category>angular</category>
      <category>frontend</category>
      <category>developer</category>
    </item>
    <item>
      <title>CSS Specificity</title>
      <dc:creator>Jhosep</dc:creator>
      <pubDate>Fri, 18 Aug 2023 01:11:34 +0000</pubDate>
      <link>https://dev.to/monkdev/css-specificity-2l62</link>
      <guid>https://dev.to/monkdev/css-specificity-2l62</guid>
      <description>&lt;p&gt;In CSS, the level of importance of styles applied to an element is governed by specificity. it determines which CSS rule set takes precedence when multiple rules are applied to the same element.&lt;/p&gt;

&lt;p&gt;Here are some examples where it applies:&lt;/p&gt;

&lt;p&gt;Inline Styles: These have the highest specificity and therefore have the highest priority. They are applied directly to an element within its style attribute.&lt;/p&gt;

&lt;p&gt;ID Selectors: These have a higher specificity than class and element selectors. But if using an ID to style multiple elements, it's important to remember that it's good practice to keep unique IDs throughout the page.&lt;/p&gt;

&lt;p&gt;Selectors class: They are less specific than IDs but more specific than element selectors. You can apply the same class to multiple elements and apply similar styles to all of them.&lt;/p&gt;

&lt;p&gt;Element Selectors: They are the least specific. These affect all elements of the same type (eg all paragraphs, all headings (p, h1), etc.) and can easily be affected by more specific rules.&lt;/p&gt;

&lt;p&gt;When multiple styles are applied to the same element and there are conflicts, the rule with the highest specificity will prevail. If two or more rules have the same specificity, the last rule found in the code will be applied.&lt;/p&gt;

&lt;p&gt;It is important to understand these hierarchies of specificity so that you can control and predict how styles will be applied on your web page.&lt;/p&gt;

&lt;p&gt;Veamos codigo&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;style&amp;gt;
#id-selector {
  color: blue;
}
.selector-class {
  color: green;
}
&amp;lt;/style&amp;gt;

&amp;lt;div id="id-selector" class="selector-class"&amp;gt;This div has an ID and a class
&amp;lt;/div&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;What color do you think is painted in the div? Well, blue since the id-selector has greater specificity.&lt;/p&gt;

&lt;p&gt;If an inline style was put in the code, it would take that value that we put in it and ignore the others.&lt;/p&gt;

</description>
      <category>css</category>
      <category>javascript</category>
      <category>developer</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Show detail data of a table with ngFor in Angular</title>
      <dc:creator>Jhosep</dc:creator>
      <pubDate>Sat, 25 Feb 2023 06:12:46 +0000</pubDate>
      <link>https://dev.to/monkdev/show-detail-data-of-a-table-with-ngfor-in-angular-56li</link>
      <guid>https://dev.to/monkdev/show-detail-data-of-a-table-with-ngfor-in-angular-56li</guid>
      <description>&lt;p&gt;The ngFor core directive allows us to create lists and data display tables in our HTML templates. It also has its own "let" with which we can pass information to show the detail of a table.&lt;/p&gt;

&lt;p&gt;In the following example we have this array:&lt;/p&gt;

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

&lt;p&gt;In a table we will show the general part of the array and then we will pass the "info" as a parameter using ngFor so that it is displayed in a second table.&lt;/p&gt;

&lt;p&gt;We show the general data in the table, and clicking on the name will show the detail in another table.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vAfFmI-n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eom15kyylg77eqfmg23w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vAfFmI-n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eom15kyylg77eqfmg23w.png" alt="first_table" width="800" height="506"&gt;&lt;/a&gt;&lt;/p&gt;

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

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

&lt;p&gt;Now we use the variable that contains the table detail with another ngFor on the table that we want to display.&lt;/p&gt;

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

&lt;p&gt;Thanks for reading, you share if it served you 😉&lt;/p&gt;

</description>
      <category>angular</category>
      <category>typescript</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
