CodeFizz

A Free Learn-To-Code Website

HTML Syntax

No search results found.

🡹

<!DOCTYPE html> and <html>

<!DOCTYPE html>
<html>
...
</html>
Try it »

Meaning and Usage


<p>

<!DOCTYPE html>
<html>
<p>Hello World!</p>
</html>
Try it »

Meaning and Usage


<title>

<!DOCTYPE html>
<html>
<title>My Webpage</title>
<p>Hello World!</p>
</html>
Try it »

Meaning and Usage


<body>

<!DOCTYPE html>
<html>
<title>Body tag</title>
<body>
<p>Hello World!</p>
</body>
</html>
Try it »

Meaning and Usage


<h1>

<!DOCTYPE html>
<html>
<title>H1 tag</title>
<body>
<h1>Welcome to my webpage!</h1>
<p>Hello World!</p>
</body>
</html>
Try it »

Meaning and Usage


<a>

<!DOCTYPE html>
<html>
<title>A tag</title>
<body>
<h1>Welcome to my webpage!</h1>
<p>Hello World!</p>
<a href="https://beiswenger.net/codefizz">Click me!</a>
</body>
</html>
Try it »

Meaning and Usage


<button>

<!DOCTYPE html>
<html>
<title>Button tag</title>
<body>
<h1>Welcome to my webpage!</h1>
<p>Hello World!</p>
<button onClick="alert('Hi!');">Click me!</button>
</body>
</html>
Try it »

Meaning and Usage


<img>

<!DOCTYPE html>
<html>
<title>Img tag</title>
<body>
<h1>Welcome to my webpage!</h1>
<p>Hello World!</p>
<img src="https://beiswenger.net/codefizz/files/logo.png" alt="CodeFizz Logo" width="200px" height="200px">
</body>
</html>
Try it »

Meaning and Usage


<div>

<!DOCTYPE html>
<html>
<title>Div tag</title>
<body>
<h1>Welcome to my webpage!</h1>
<div style="background: beige; width: 200px; height: 200px;"></div>
</body>
</html>
Try it »

Meaning and Usage


<iframe>

<!DOCTYPE html>
<html>
<title>iFrame tag</title>
<body>
<h1>Welcome to my webpage!</h1>
<iframe src="https://beiswenger.net/codefizz" width="500" height="500"></iframe>
</body>
</html>
Try it »

Meaning and Usage


<br>

<!DOCTYPE html>
<html>
<title>Br tag</title>
<body>
<h1>Welcome to my webpage!</h1>
<p>Hello World!</p>
<br>
<p>Notice the large break between lines?</p>
</body>
</html>
Try it »

Meaning and Usage


<hr>

<!DOCTYPE html>
<html>
<title>Hr tag</title>
<body>
<h1>Welcome to my webpage!</h1>
<hr>
<p>Notice the horizontal line?<p>
</body>
</html>
Try it »

Meaning and Usage


<style>

<!DOCTYPE html>
<html>
<title>Style tag</title>
<style>
div {
background: gold;
border: 2px solid black;
position: absolute;
font-weight: bold;
padding: 3px;
}
div::before {content: ">";}
div::after {content: "<";}
</style>
<body>
<div>_</div>
</body>
</html>
Try it »

Meaning and Usage


<script>

<!DOCTYPE html>
<html>
<title>Script tag</title>
<body>
<button onClick="greet();">Click me!</button>
<p id="name"></p>
</body>
<script>
function greet(){
var name=prompt("What's your name?");
var namelist=['Jeff','Mario','Luigi','Yoshi','Toad','sinking. Somebody help','a zombie'];
var me=namelist[Math.floor(Math.random()*namelist.length)];
document.getElementById("name").innerText="Hi "+name+", I'm "+me+"!";
}
</script>
</html>
Try it »

Meaning and Usage


<details> and <summary>

<!DOCTYPE html>
<html>
<title>Details and summary tags</title>
<body>
<details>
<summary>CodeFizz rocks!</summary>
<p>Join the <a href="/cfdiscord">CodeFizz Discord</a></p>
<p>Support us on <a href="/cfpatreon">CodeFizz Patreon</a></p>
<p>Subscribe to the <a href="/cfyoutube">CodeFizz YouTube Channel</a></p>
</details>
</body>
</html>
Try it »

Meaning and Usage


<b> and <strong>

<!DOCTYPE html>
<html>
<title>B and strong tags</title>
<body>
<b>This text is bold.</b><br>
<strong>This text is also bold.</strong>
</body>
</html>
Try it »

Meaning and Usage


<i> and <em>

<!DOCTYPE html>
<html>
<title>I and em tags</title>
<body>
<i>This text is italic.</i><br>
<em>This text is also italic.</em>
</body>
</html>
Try it »

Meaning and Usage


<u> and <ins>

<!DOCTYPE html>
<html>
<title>U and ins tags</title>
<body>
<u>This text is underlined.</u><br>
<ins>This text is also underlined.</ins>
</body>
</html>
Try it »

Meaning and Usage


<s> and <del>

<!DOCTYPE html>
<html>
<title>S and del tags</title>
<body>
<s>This text has strikethrough.</s><br>
<del>This text also has strikethrough.</del>
</body>
</html>
Try it »

Meaning and Usage


<q>

<!DOCTYPE html>
<html>
<title>Q tag</title>
<body>
<p><q>This text has quotes.</q> - Professor Dragon 2020</p>
</body>
</html>
Try it »

Meaning and Usage


<sup> and <sub>

<!DOCTYPE html>
<html>
<title>Sup and sub tags</title>
<body>
<p>Look, I'm <sup>high!</sup></p>
<p><sub>Low,</sub> I am.</p>
</body>
</html>
Try it »

Meaning and Usage


<abbr>

<!DOCTYPE html>
<html>
<title>Abbr tag</title>
<body>
<p>CodeFizz can teach you <abbr title="HyperText Markup Language">HTML</abbr> for free!</p>
</body>
</html>
Try it »

Meaning and Usage