Abhishek Gambhir
Abhishek Gambhir

Reputation: 1

Can Javascript be used to format HTML

I was just wondering if it is possible to format HTML using Javascript. Thanks a lot!

I am asking this as it is for an answer to a question in a practice paper for an exam. The question shows a fairly basic webpage and the question asks, "Which aspect of HTML allows for the formatting of the site". So I am wondering if javascript could be a valid answer

Upvotes: 0

Views: 67

Answers (2)

Dante
Dante

Reputation: 283

Javascript is not an aspect of HTML.

If the question is "which aspect of html allows the formatting of a site?", I would say your answer is styling, or more specifically, the style attribute.

Here is a more detailed explanation.

Or, because the question is not specific enough, the answer could be html layouts, since the style attribute would imply the use of CSS.

You can find out more about html layouts here.

Upvotes: 1

Sameer Alibhai
Sameer Alibhai

Reputation: 3178

EDIT: The answer is no.

JavaScript can be used to do just about anything on a site including customizing the look and feel, changing colour, adding elements, applying classes, etc...

But Javascript is NOT an aspect of HTML as correctly pointed out in the comments below.

Upvotes: 1

Related Questions