MCPcopy Create free account
hub / github.com/PageBot/PageBot / title

Method title

Lib/pagebot/contexts/htmlcontext/htmlbuilder.py:688–711  ·  view source on GitHub ↗

This tag defines the title of the document. self.title() ... self._title() >>> b = HtmlBuilder() >>> b.compact = True >>> b.html() >>> b.head() >>> b

(self)

Source from the content-addressed store, hash-verified

686 self._closeTag('head')
687
688 def title(self):
689 """This tag defines the title of the document.
690
691 <www href="http://www.w3schools.com/tags/tag_title.asp" target="external"/>
692
693 self.title()
694 ...
695 self._title()
696
697 >>> b = HtmlBuilder()
698 >>> b.compact = True
699 >>> b.html()
700 >>> b.head()
701 >>> b.title()
702 >>> b.addHtml('Title of the page')
703 >>> b._title()
704 >>> b._head()
705 >>> b._html()
706 >>> b.getHtml().startswith('<html')
707 True
708 """
709 self.tabs()
710 self.tabIn()
711 self.write_tag('link', True, {})
712
713 def _title(self):
714 self._closeTag('title')

Callers

nothing calls this directly

Calls 3

tabInMethod · 0.80
write_tagMethod · 0.80
tabsMethod · 0.45

Tested by

no test coverage detected