Computer Science, asked by khushu8594, 11 months ago

Does Python support Hyper Text Markup Language?

Answers

Answered by NehaKari
0

YES, python do support hypertext markup language.

HYPERTEXT MARKUP LANGUAGE is mainly used to build a website or display website and web application content. Whereas PYTHON is a HIGH LEVEL LANGUAGE which uses simple codes and builds great animations and develops web.

So one can easily write HTML codes in python since python uses various modules to work with various forms of structured data MARKUP.

For example we can write "helloworld" code using HTML (hypertext markup language) CODES in PYTHON SCRIPT in the following way:-

<html>

<head></head>

<body><p>Helloworld!</p></body>

</html>

This was just a basic code and in this way PYTHON CAN SUPPORT HYPERTEXT MARKUP LANGUAGE.

Thus we automatically created an HTML file and then we have to go to FIREFOX to open the file in a new tab.

The final step is go and view the HTML page in your web browser.

Answered by poojan
1

Yes, Python support Hyper Text Markup Language.

Justification :

  • Python documentation says that, python has the capability of working with various structured data markup languages, through the modules it have.

  • It can work efficiently with the modules of HTML (Hypertext Markup Language), SGML (Standard Generalized Markup Language) and a good number of interfaces for working with the XML (Extensible Markup Language).

  • For example, on importing the parser module from html library, we can use the class HTMLParser from it, which helps in parsing the text files of HTML and XHTML.

  • class html.parser.HTMLParser(strict=True)

        In this, if you use the status of strict as True, It will return you if the exact filename exists. Else, It raises a HTMLParseError.

  • class html.parser.HTMLParser(strict=False)

        If you make the status of strict as False, It helps you with the best guesses if any invalid HTML file name encounters, using heuristics. It is highly recommendable.

In such a way, python supports Hyper Text Markup Language.

Learn more :

  • Know about HTML here.

        https://brainly.in/question/643321

  • Advantages of Python Programming?

        brainly.in/question/11007952

Hope it helped you. Thank you!

Similar questions