Code Block

HTML Code Block

From what I can tell the </img>tag is the only inline-block by default. To be on the safe side I would recommend a class,you never know when changing all elements display:inline-block;to it. This way you aren't changing the default functionality of standard elements.


<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>This is the title</title>
</head>
<body>

<h1 id="demo">Some text</h1>
<p id="demo">Some text</p>

</body>
</html>

CSS Code Block

CSS is used to define styles for your web pages, including the design, layout and variations in display for different devices and screen sizes. text-align is a property, and center is the property value


body {
background-color: lightblue;
}

h1 {
color: white;
text-align: center;
}

p {
font-family: verdana;
font-size: 20px;
}

JavaScript Code Block

JavaScript is the world's most popular programming language. Create a variable called carName and assign the value Volvoto it.

<!DOCTYPE html><html><head><script>function myFunction(){document.getElementById("demo").innerHTML = "Paragraph changed."}</script></head><body><h2>Demo JavaScript in Head</h2><p id="demo">A Paragraph</p><button type="button" onclick="myFunction()">Try it</button></body></html>

PHP Code Block

PHP is a server scripting language,and a powerful tool for making dynamic and interactive Web pages. With PHP,there are two basic ways to get output:echoand print.

<!DOCTYPE html><html><body><h2>Demo JavaScript in Head</h2><?php $color = "red";echo "My car is " . $color . "<br>";echo "My house is " . $COLOR . "<br>";echo "My boat is " . $coLOR . "<br>";?></body></html>

Still stuck?How can we help?

Was this helpful? YesNo

Written by

logo-img