Create Your First Functional Component in React JS – Beginner's Guide

Image
Create Your First Functional Component in React JS  1. Introduction When you start learning React JS, one of the first things you will come across is the concept of components. At first, components may seem like just another programming concept, but they are actually the foundation of almost every React application. Think about a website you use every day. It may have a header, navigation menu, login form, product section, and footer. Instead of writing all these elements together in one large file, React allows us to create separate parts and manage them independently. These separate parts are called components. In this tutorial, we are going to create our first functional component in React. We will start with a very simple example and gradually understand how components are created, exported, imported, and displayed on a webpage.  2. What Is a Functional Component in React?   A functional component is simply a JavaScript function that returns a user interface using JSX...

What is CSS Outline Width ,Syntax, Values & Examples

What is CSS Outline Width? Syntax, Values & Examples

css Outline width property explained

This Blog You Will Learn
 ஃ  What is CSS outline width
 ஃ  Syntax:
 ஃ  CSS Outline Width Property  Program 
 ஃ  Syntax:
 ஃ  CSS Outline Width Property  Program 
 ஃ  structure diagram examples
 ஃ  Explain Program
 ஃ  Output

What is CSS outline width

✔ Outline-width property in css defines thickness of the outline drawn around element.

✔ Outline is a line that appears  outside the border  of an element.

✔ Mainly use highlight elements especially for focus states 

Syntax:

selector
{
outline-width: value;
}

outline to appear

outline-style: value;


ஃ structure diagram examples
What is CSS Outline Width ,Syntax, Values & Examples
CSS Outline Width Property 

Program 

<!DOCTYPE html>
<html>
<head>
<style>
p {
  padding: 5px;
  outline-style: solid;
  outline-color: blue;
}

p.box1 {
  outline-width: thin;
}

p.box2 {
  outline-width: medium;
}

p.box3 {
  outline-width: thick;
}

p.box4 {
  outline-width: 8px;
}
</style>
</head>
<body>

<h2>CSS Outline Width Property Explained</h2>

<p class="box1">CSS Outline Property - thin.</p>
<p class="box2">CSS Outline Property -  medium.</p>
<p class="box3">CSS Outline Property - thick.</p>
<p class="box4">CSS Outline Property - 8px thick.</p>

</body>
</html>

CSS Outline Width Property Explained
Explain Program

Step  1] 

<!DOCTYPE html>

  • This declare the document type.
  • browser that the document is written in html

Step 2]  

<html>.... . </html>

  • html is the root element of the html page.
  •  Every thing inside it is part of the webpage.

Step 3]

<head>

  • <head> section  contains metadata and css styles,not visible content.

  • Contains styles, metadata and page setting 

Step 4] 

<style> tag Internal CSS Section

p {
  padding: 5px;
  outline-style: solid;
  outline-color: blue;
}

Padding : 5px;

  •  Add space inside paragraph.
  • creates space between text and outline.

outline-style: solide;

  • outline visible.

outline-color: blue;

  • set outline color to blue.

Outline Width Classes


p.box1 {
  outline-width: thin;
}

  • sets outline thickness to thin.
  • predefined keyword.


p.box2 {
  outline-width: medium;
}

  • set outline thickness  to medium.
  • Medium is the default value.


p.box3 {
  outline-width: thick;
}

  • sets outline thickness to thick.
  • makes outline wider.


p.box4 {
  outline-width: 8px;
}

  • Sets customer thickness use 8 pixels.
  • This fixed size value.

Step 4] 

Closing tag
</style>
</head>

Step 5] 

Body Section


<body>

<h2>CSS Outline Width Property Explained</h2>

  • Display heading on webpage.


<p class="box1">CSS Outline Property - thin.</p>
<p class="box2">CSS Outline Property -  medium.</p>
<p class="box3">CSS Outline Property - thick.</p>
<p class="box4">CSS Outline Property - 8px thick.</p>

  • Each paragraph use different class.
  • Each class applies a different outline-width value.

Step 6]

Closing tag


  </body>
</html>

CSS Outline Width Property Explained

Output

CSS Outline Width Property Explained


Related Post :-



Comments

Popular posts from this blog

HTML Tag

CSS Text Color Explained with Syntax and HTML Examples

CSS Outline Offset Property with Practical Examples