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

HTML mark Tag Explained with Examples

how to use mark tag in html

how to use mark tag in html

What is the  HTML <mark> Tag.

 ✷ The <mark> tag in HTML is used to highlight text so that it stands out from the rest of the content. By default, browsers display the marked text with a yellow background, similar to using a highlighter pen.
 ✷ The syntax of the <mark> tag is simple:
 ✷ <mark>Highlighted text</mark>
 ✷ This tag is useful when you want to draw attention to important words, such as search results, keywords, or key points in an article.
 ✷ For example:<p>This is a <mark>very important</mark> message.</p>
 ✷ In this example, the words “very important” will appear highlighted, making them easy to notice.
 ✷ The <mark> tag is an inline element, which means it can be used inside paragraphs, headings, or other text without breaking the layout.
 ✷ It improves readability and helps users quickly find important information.
 ✷ Unlike styling with CSS, the <mark> tag also has semantic meaning, indicating that the text is relevant or highlighted for a specific reason.
 ✷ HTML  <mark> tag is use higlight or mark text.<mark> tag is highlighted  text useally appears with yellow background in the browser.

Syntax:-

<mark>text  highlighted </mark>

how to use mark tag in html

 Example

<!DOCTYPE html>
<html>
 <body>
  <h2> how to use mark tag in html</h2>
<p>student learn <mark> HTML </mark> programming language</p>
    <p> Student learn <mark>CSS</mark> Programming language</p>

 </body>

</html>

how to use mark tag in html

Explain Program

Step 1 ]

<!Doctype html>

<!doctype html>  always be the first line of any HTML document.

Step 2 ]

   <html> and </html>

   html  is the root element.

Step 3 ]

<body> and </body>

body  is  main content area.

All visible content inside to  the <body> tag

Step 4]

<h2> how to use mark tag in html</h2>

<h2>  display title create second-level heading  bold  larger text.</h2>

Step 5]

<p>student learn <mark> HTML </mark> programming language</p>
    <p> Student learn <mark>CSS</mark> Programming language</p>

<p> defines paragraph  of text.
<mark> highlights text with yellow background default. 

Step 6]

closing the Tag

</body>
</html>

how to use mark tag in html

Output

html mark tag

Related Post :-

html reset button example

frameset tag in html with example

how to create checbox in html


Comments

Popular posts from this blog

HTML Tag

CSS Text Color Explained with Syntax and HTML Examples

CSS Outline Offset Property with Practical Examples