XPath Text(): Enhance your skills by practicing XPath Text() syntax with our given sample HTML codes and interactive exercises, designed to help you master selecting elements in HTML and XML documents.

Boost Your Skills: Practice XPath Text() Syntax with easy Exercises.


Home->Practice 5

  Next Exercise >>
Please Follow Step 1: Read XPath Question >>Step 2: Check HTML Source Code >>Step3: Enter XPath Syntax in O/P Box
XPath Exercise 5

Q1. Find Coffee Item with Text() function

Q2. Find Tea Item with Text() function

Q3. Find Milk Item with Text() function

Q3. Find Email with Text() function

HTML Source document
         <h1 id="h1" name="header">Heading 1 </h1>
         <ul>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul> 

<label class="form-label" id="userEmail-label">
Email
</label>
        
        

XPath O/P Box

Enter XPath Syntax here:   

XPath Tips and Syntax For This Page Exercise :

Using text()

     //*[text()='testdata']

The text() function in XPath can be used to select the text content of an element.

We would love to hear your thoughts, suggestions, concerns or problems with anything so we can improve. Request you to please use Social Media button in Right Side for this website growth.