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...

Top 15 HTML MCQ With Answers part(6)


Top 15 HTML  MCQ With Answers

Top 25 HTML  MCQ With Answers part(6)


 1] What is the correct file extension for a HTML files?

a) .htm
b) .html
c) .css
d) .web

Answer: a


2] What is the purpose of the <br>?

a) To break text into two columns
b) To insert a line break
c) To add a border
d) To insert a blank line

Answer: b


3] How can you create a numbered list in HTML language?

a) <ul>
b) <ol>
c) <li>
d) <nl>

Answer: b


4] Which attribute is use to specify a unique identifier for an HTML tag?

a) class
b) name
c) style
d) id

Answer: d] id


5] Which tag is used to link an external CSS file in the <head> section in html tag?

A) <css>
B) <link>
C) <style>
D) <script>

Answer: B) <link>


6] What is the purpose of the used to <meta charset="UTF-8"> tag?

A) Defines the page language
B) Specifies the character encoding
C) Links JavaScript files
D)  Loads external stylesheets 

Answer: B) Specifies the character encoding


7]  Which <meta> tag is use for search engine optimization (SEO)?

A) <meta viewport>
B) <meta name="description">
C) <meta http-equiv="refresh">
D) <meta charset>  

Answer: B) <meta name="description">


8] Which <meta> tag is use to refresh a page automatically?

A)  <meta auto-update>
B) <meta http-equiv="refresh" content="5">
C) <meta refresh>
D) <meta name="refresh"> 

Answer: B) <meta http-equiv="refresh" content="5">


9] What does <meta name="keywords"> tag?

A) Defines the page title
B) Helps search engines index the page
C) Specifies the page’s author
D) Controls viewport scaling

Answer: B) Helps search engines index the page


10] Which <meta> tag is use to define the author of a webpage?

A) <meta name="author">
B) <meta name="creator">
C) <meta name="publisher">
D) <meta author>

Answer: A) <meta name="author">


11] What is the default alignment of text in an HTML tag?

a) Center
b)  Justify 
c) Right
d)  Left

Answer: d] left


12] Where should the <link>  be placed in an HTML document?

A) Inside <body>
B) Inside <head>
C) At the bottom of <body>
D) Before <html>

Answer: B) Inside <head>


13]Which tag is use to define inline CSS in <head> section?

A) <css>
B) <link>
C) <style>
D) <script>

Answer: C) <style>


14] Which attribute in the <link> tag specifies the location of an external file?

A) href
B) src
C) path
D) location

Answer: A) href


15] Which <meta> tag is use to make a webpage responsive?

A) <meta viewport>
B) <meta http-equiv="X-UA-Compatible">
C) <meta name="responsive">
D)  <meta charset="UTF-8">

Answer: A) <meta viewport>



Comments

Popular posts from this blog

HTML Tag

CSS Text Color Explained with Syntax and HTML Examples

CSS Outline Offset Property with Practical Examples