Websites are built using the idea of tags to define how a we
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 takes effect and a closing tag indicates where the tag stops having an effect. Write a statement that correctly assigns annotated Text with the opening tag, followed by the element Text, and then the closing tag. If tagldentifier is \'p\' and elementText is \'New paragraph\', then annoatatedText is \'Newparagraph\'.
Solution
% code
function annotatedText = WebMarkup(identifierTag, elementText)
% strcat is the function used to concatenate the strings
annotatedText = strcat(\'<\', identifierTag, \'>\', elementText, \'</\', identifierTag, \'>\');
end
WebMarkup(\'p\', \'New Paragraph\')
WebMarkup(\'i\', \'Emphasize the text\')
% SAMPLE OUTPUT
| % code function annotatedText = WebMarkup(identifierTag, elementText) WebMarkup(\'p\', \'New Paragraph\') |
| % SAMPLE OUTPUT ans = <p>New Paragraph</p> ans = <i>Emphasize the text</i> |
