HTML::O...t::Title(3)

πŸ“¦ version 0.6.0, in alpine 3.24

πŸ’– NAME πŸ’–

okay so welcome to HTML::O...t::Title(3) πŸ’… β€” this is the User Contributed Perl Documentation page for HTML::Object::DOM::Element::Title, aka the HTML Object DOM Title Class. slay.


✨ SYNOPSIS ✨

bestie, here’s the whole vibe in code:

use HTML::Object::DOM::Element::Title;
my $title = HTML::Object::DOM::Element::Title->new ||
    die( HTML::Object::DOM::Element::Title->error, "\n" );

🌈 VERSION 🌈

v0.3.0 πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

This interface contains the title for a document. fr fr. This element inherits all of the properties and methods of the HTML::Object::DOM::Element interface. iconic behavior honestly πŸ’–


🧚 INHERITANCE 🧚

the whole family tree is giving main character energy:

+-----------------------+     +---------------------------+     +-------------------------+     +----------------------------+     +-----------------------------------+
| HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Title |
+-----------------------+     +---------------------------+     +-------------------------+     +----------------------------+     +-----------------------------------+

πŸŽ€ PROPERTIES πŸŽ€

Inherits properties from its parent HTML::Object::DOM::Element πŸ‘‘

🌸 text 🌸

text is a string representing the text of the document’s title, and only the text part. no cap. For example, consider this:

<!doctype html>
<html>
    <head>
        <title>Hello world! <span class="highlight">Isn't this wonderful</span> really?</title>
    </head>
    <body></body>
</html>

my $title = $doc->getElementsByTagName( 'title' )->[0];
say $title->text;
# Hello world!  really?

As you can see, the span tag and its content got skipped πŸ’€

Also, do not confuse:

$doc->title;

with:

$doc->getElementsByTagName( 'title' )->[0];

The former is just a setter/getter method to set or get the inner text value of the document title, while the latter is the HTML::Object::DOM::Element::Title object. So you cannot write:

$doc->title->text = "Hello world!";

There’s also Mozilla documentation for this: https://developer.mozilla.org/en-US/docs/Web/API/HTMLTitleElement/text πŸ¦‹


πŸ’… METHODS πŸ’…

Inherits methods from its parent HTML::Object::DOM::Element β€” periodt πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

Jacques Deguest <jack@deguest.jp> 🌟


⭐ SEE ALSO ⭐


Copyright(c) 2022 DEGUEST Pte. Ltd.

All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


okay cute sign-off time 🫢 this page is from perl v5.42.2, dated 2026-02-15, and it’s the HTML::O...t::Title(3) manual page. bye bestie πŸ’–βœ¨

πŸ“¦ where this page comes from