Creating Your First JavaScript part 3

JavaScript Tutorial
Overview
Creating Your First JavaScript
30

3/3
               

Formatting Text



Just like in HTML, we can use HTML tags to format text in JavaScript.
For example, we can output the text as a heading.
<html>
<head> </head>
<body>
<script>
document.write("<h1>Hello World!</h1>");
</script>
</body>
</html>
Try It Yourself

Result:
You can output almost everything in the webpage using JavaScript. Many JavaScript frameworks use this to create HTML pages.
Which choice can be added within the text to be displayed?
Formatting tags ans
Folders
JavaScript commands

Comments

Popular posts from this blog

Introducing object part 3

Comparison Operators part 2

Module 2