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)
% 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

  ans = <p>New Paragraph</p>  ans = <i>Emphasize the text</i>
 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

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site