13.2k views
3 votes
websites are built using the idea of tags to define how a web browser displays the content. an opening tag indicates where the tag starts to take effect and a closing tag indicates where the tag stops having an effect. write a function called webmarkup that assigns annotatedtext with the opening tag, followed by the elementtext, and then the closing tag. all input arguments are character vectors. restrictions: no spaces should exist between the tags and elementtext. the identifiertag should be surrounded by angle brackets. the closing identifiertag should contain an additional '/'.

User Petabyte
by
7.9k points

1 Answer

2 votes

Final answer:

HTML tags are used to define how a web browser displays the content of a website. By using opening and closing tags, we can markup text and assign annotated elements with a function called webmarkup.

Step-by-step explanation:

The correct answer is option: HTML. Websites are built using the idea of HTML tags to define how a web browser displays the content. An opening tag, indicated by angle brackets (<), marks where the effect of a tag begins, while a closing tag, indicated by angle brackets followed by a slash (</), marks where the effect of a tag ends.

To create a function called webmarkup that assigns annotatedtext with the opening tag, elementtext, and closing tag, you can use the following code:

def webmarkup(identifiertag, elementtext):
annotatedtext = f"<{identifiertag}>{elementtext}</{identifiertag}>"
return annotatedtext

For example, if you call webmarkup('h1', 'Hello World'), it will return <h1>Hello World</h1>. Notice that there should be no spaces between the tags and element text, and that the closing identifiertag includes an additional slash (/).

User Scott Bellware
by
7.7k points