W3Schools.com (2024)

❮ XSLT Element Reference

Definition and Usage

The <xsl:value-of> element extracts the value of a selected node.

The <xsl:value-of> element can be used to select the value of an XML element and add it to the output.

Syntax

<xsl:value-ofselect="expression"disable-output-escaping="yes|no" />

Attributes

Attribute Value Description
select expression Required. An XPath expression that specifies which node/attribute to extract the value from. It works like navigating a file system where a forward slash (/) selects subdirectories.
disable-output-escaping yes
no
Optional. "yes" indicates that special characters (like "<") should be output as is. "no" indicates that special characters (like "<") should be output as "&lt;". Default is "no"

Examples

The example below puts the values from the first title and artist elements and puts it in a table:

Example 1

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
<html>
<body>
<h1>Music Collection:</h1>
<table border="1">
<tr bgcolor="#9acd32">
<th>Title</th>
<th>Artist</th>
</tr>
<tr>
<td><xsl:value-of select="catalog/cd/title" /></td>
<td><xsl:value-of select="catalog/cd/artist" /></td>
</tr>
</table>
</body>
</html>
</xsl:template>

</xsl:stylesheet>

Try it Yourself »

The example below loops trough each cd element and creates a table row with the values from title and artist for each cd element:

Example 2

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
<html>
<body>
<h1>Music Collection:</h1>
<table border="1">
<tr bgcolor="#9acd32">
<th>Title</th>
<th>Artist</th>
</tr>
<xsl:for-each select="catalog/cd">
<tr>
<td><xsl:value-of select="title" /></td>
<td><xsl:value-of select="artist" /></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>

</xsl:stylesheet>

See Also
What is XSL?

Try it Yourself »

❮ XSLT Element Reference

W3schools Pathfinder

Track your progress - it's free!

W3Schools.com (2024)

FAQs

Is W3Schools completely free? ›

Both My Learning and W3Schools Public Profile are completely free of charge, however there are available upgrade plans that can enhance your learning experience.

What is W3Schools? ›

W3Schools is a school for web developers, covering all the aspects of web development: HTML Tutorial. CSS Tutorial. JavaScript Tutorial.

Is W3Schools outdated? ›

They are not outdated but they are providing basic knowledge. You will get basic knowledge by reading on w3school and it is good for beginners. For advance you have to check each langauge official site and go through documents and their tutorials.

Is W3Schools good for kids? ›

W3Schools is a free educational website for learning coding online that's great for more advanced coders. For students in middle school and high school, W3Schools is a great resource for coding tutorials in multiple languages. Students can get detailed information on coding topics in an easy-to-digest format.

Is W3School good or bad? ›

W3schools is good for a quick reference point if you're in the middle of coding something and want to find out a specific function or whatever. If you want to learn advanced code I would avoid W3schools however w3schools is a good free resource for the average programmer.

What are the fees for w3school? ›

Exam overview
Program fee:$695
Number of attempts to pass:3
Exam deadline:None
Certification Expiration:None
Format:Online, multiple choice
8 more rows

How does W3school make money? ›

Through ads : through ads alone they will earn alot in w3schools. They would earn nearly 1–2lacks per day in ads alone. Through donation:. Many people who completed their courses in w3schools, after few years , they would donate some money for the growth of the site .

Is W3Schools certification legit? ›

W3Schools is Trusted by Top Companies

Our certificates are recognized and valued by companies looking to employ skilled developers.

Who owns W3Schools? ›

The website and the solutions are operated and managed by separate entities. Refsnes Data offers the website (w3schools.com) including all its content, information, and related tools. The solutions (Such as Spaces, Courses, and My learning) and billing system are operated by W3schools Network.

Why should we avoid W3Schools? ›

Mainly what is wrong with W3Schools is that people take it for granted and do not realize that the whole site is better as a reference site rather than learning material for several reasons. One of the main reasons is lack of in depth explanations, outdated methodologies and old content.

Why do people dislike W3Schools? ›

w3schools tend to oversimplify the concepts to the point of technical inaccuracy. and the tone of the articles read more like tutorials instead of reference manuals. Yeah MDN is the de-facto reference guide for web frameworks. W3schools feels like beginner tutorials.

Which is better W3Schools or Codecademy? ›

Of the two, Codecademy has a simpler structure. You can easily find the topic you want and start learning. Its fixed pricing plans are also easier to understand. In addition, the biggest issue with W3Schools is the ads that keep popping up as you learn.

Can I get a job with W3Schools certificate? ›

Web Design Certification

Becoming certified by W3Schools is great proof to show to employers and makes your resume stand out among other candidates.

Can you learn from W3Schools? ›

HTML Tutorial

W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

How popular is W3Schools? ›

The Most Popular Browsers

W3Schools has over 60 million monthly visits.

Is W3 free to use? ›

You can edit code examples and execute code experimentally, to see what works and what does not, before implementing it. W3schools is and will always be a completely free developer resource.

How does w3school make money? ›

Through ads : through ads alone they will earn alot in w3schools. They would earn nearly 1–2lacks per day in ads alone. Through donation:. Many people who completed their courses in w3schools, after few years , they would donate some money for the growth of the site .

Is W3Schools space free? ›

Getting started with Spaces is straightforward: simply sign up for an account to begin with a Free subscription, which requires no payment.

Which is better W3Schools or codecademy? ›

Of the two, Codecademy has a simpler structure. You can easily find the topic you want and start learning. Its fixed pricing plans are also easier to understand. In addition, the biggest issue with W3Schools is the ads that keep popping up as you learn.

Top Articles
Latest Posts
Article information

Author: Melvina Ondricka

Last Updated:

Views: 5822

Rating: 4.8 / 5 (48 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Melvina Ondricka

Birthday: 2000-12-23

Address: Suite 382 139 Shaniqua Locks, Paulaborough, UT 90498

Phone: +636383657021

Job: Dynamic Government Specialist

Hobby: Kite flying, Watching movies, Knitting, Model building, Reading, Wood carving, Paintball

Introduction: My name is Melvina Ondricka, I am a helpful, fancy, friendly, innocent, outstanding, courageous, thoughtful person who loves writing and wants to share my knowledge and understanding with you.