Discuss Scratch
- dabaws424
-
29 posts
HTML5, CSS, and Bootstrap
Just testing to see if HTML works on this…
<code>
Test
</code>
<code>
Test
</code>
- dabaws424
-
29 posts
HTML5, CSS, and Bootstrap
Quiz: Does this code work? (if not give an example why not) first one to answer correctly gets 5 favs
<!DOCTYPE html>
<style type="text/css">
.btn {
background-color: red;
}
body {
background-color: black;
}
</style>
<title>Title<title/>
<body>
<h1>Title</h1>
<button class="btn">Button</button>
Last edited by dabaws424 (Feb. 17, 2016 20:51:30)
- Icely
-
100+ posts
HTML5, CSS, and Bootstrap
You don't close the body tag. Quiz: Does this code work? (if not give an example why not) first one to answer correctly gets 5 favs<!DOCTYPE html>
<style type="text/css">
.btn {
background-color: red;
}
body {
background-color: black;
}
</style>
<title>Title<title/>
<body>
<h1>Title</h1>
<button class="btn">Button</button>
- Jonathan50
-
1000+ posts
HTML5, CSS, and Bootstrap
It Quiz: Does this code work? (if not give an example why not) first one to answer correctly gets 5 favswill work but it should be in an HTML tag and the style and title tags should go in a head tag and the body tag should be closed.<!DOCTYPE html>
<style type="text/css">
.btn {
background-color: red;
}
body {
background-color: black;
}
</style>
<title>Title<title/>
<body>
<h1>Title</h1>
<button class="btn">Button</button>
- Dylan5797
-
1000+ posts
HTML5, CSS, and Bootstrap
There is no <html> tag, <style> should be in <head> or <body> Quiz: Does this code work? (if not give an example why not) first one to answer correctly gets 5 favs<!DOCTYPE html>
<style type="text/css">
.btn {
background-color: red;
}
body {
background-color: black;
}
</style>
<title>Title<title/>
<body>
<h1>Title</h1>
<button class="btn">Button</button>
There is no <head>
the closing tag for <title> is <title/>, not </title>
- __init__
-
1000+ posts
HTML5, CSS, and Bootstrap
Depends what you define as “work”. Quiz: Does this code work? (if not give an example why not) first one to answer correctly gets 5 favs<!DOCTYPE html>
<style type="text/css">
.btn {
background-color: red;
}
body {
background-color: black;
}
</style>
<title>Title<title/>
<body>
<h1>Title</h1>
<button class="btn">Button</button>
The code quality and conventions are terrible - you need an <html> tag, <head> tag and closing </body> tag. The slash in <title/> should be at the beginning - e.g. </title>. Also it's generally a good idea to have a seperate file for your stylesheets.
But if your definition of “work” is pretty loose, then it will display a title-less page with a h1 saying “Title” and a style-less button saying “Button”. It will do something.
Also, no, HTML code doesn't work in the forums.
And what does any of this have to do with Bootstrap?
- dabaws424
-
29 posts
HTML5, CSS, and Bootstrap
There is no <html> tag, <style> should be in <head> or <body> Quiz: Does this code work? (if not give an example why not) first one to answer correctly gets 5 favs<!DOCTYPE html>
<style type="text/css">
.btn {
background-color: red;
}
body {
background-color: black;
}
</style>
<title>Title<title/>
<body>
<h1>Title</h1>
<button class="btn">Button</button>
There is no <head>
the closing tag for <title> is <title/>, not </title>
dear Dylan5797,
The
<!DOCTYPE html>
<html>
sincerely,
Dabaws424
Last edited by dabaws424 (Feb. 18, 2016 16:03:25)
- dabaws424
-
29 posts
HTML5, CSS, and Bootstrap
And the winner issssssss:
__init__
because he was right that the close tag of title should be at the front of the close tag not the back of the close tag, otherwise the rest of the page would be the title.
Congradulations, __init__
__init__
because he was right that the close tag of title should be at the front of the close tag not the back of the close tag, otherwise the rest of the page would be the title.
Congradulations, __init__
- DigiTechs
-
500+ posts
HTML5, CSS, and Bootstrap
There is no <html> tag, <style> should be in <head> or <body> Quiz: Does this code work? (if not give an example why not) first one to answer correctly gets 5 favs<!DOCTYPE html>
<style type="text/css">
.btn {
background-color: red;
}
body {
background-color: black;
}
</style>
<title>Title<title/>
<body>
<h1>Title</h1>
<button class="btn">Button</button>
There is no <head>
the closing tag for <title> is <title/>, not </title>
dear Dylan5797,
Thetag, counts as an<!DOCTYPE html>tag.<html>
sincerely,
Dabaws424
<!DOCTYPE html> doesn't count as <html> - http://stackoverflow.com/questions/9346954/doctype-html-what-does-it-mean
- dabaws424
-
29 posts
HTML5, CSS, and Bootstrap
im sorry, it makes it, like actually HTML5 im pretty sure, and you sure that dude typed inThere is no <html> tag, <style> should be in <head> or <body> Quiz: Does this code work? (if not give an example why not) first one to answer correctly gets 5 favs<!DOCTYPE html>
<style type="text/css">
.btn {
background-color: red;
}
body {
background-color: black;
}
</style>
<title>Title<title/>
<body>
<h1>Title</h1>
<button class="btn">Button</button>
There is no <head>
the closing tag for <title> is <title/>, not </title>
dear Dylan5797,
Thetag, counts as an<!DOCTYPE html>tag.<html>
sincerely,
Dabaws424
<!DOCTYPE html> doesn't count as <html> - http://stackoverflow.com/questions/9346954/doctype-html-what-does-it-mean
<script>
- liam48D
-
1000+ posts
HTML5, CSS, and Bootstrap
Do note only one element can be in the root of an XML/HTML document. Therefore your code is invalid, because there is more than one root element.im sorry, it makes it, like actually HTML5 im pretty sure, and you sure that dude typed inThere is no <html> tag, <style> should be in <head> or <body> Quiz: Does this code work? (if not give an example why not) first one to answer correctly gets 5 favs<!DOCTYPE html>
<style type="text/css">
.btn {
background-color: red;
}
body {
background-color: black;
}
</style>
<title>Title<title/>
<body>
<h1>Title</h1>
<button class="btn">Button</button>
There is no <head>
the closing tag for <title> is <title/>, not </title>
dear Dylan5797,
Thetag, counts as an<!DOCTYPE html>tag.<html>
sincerely,
Dabaws424
<!DOCTYPE html> doesn't count as <html> - http://stackoverflow.com/questions/9346954/doctype-html-what-does-it-meanbefore he did that?<script>
- dabaws424
-
29 posts
HTML5, CSS, and Bootstrap
Do note only one element can be in the root of an XML/HTML document. Therefore your code is invalid, because there is more than one root element.im sorry, it makes it, like actually HTML5 im pretty sure, and you sure that dude typed inThere is no <html> tag, <style> should be in <head> or <body> Quiz: Does this code work? (if not give an example why not) first one to answer correctly gets 5 favs<!DOCTYPE html>
<style type="text/css">
.btn {
background-color: red;
}
body {
background-color: black;
}
</style>
<title>Title<title/>
<body>
<h1>Title</h1>
<button class="btn">Button</button>
There is no <head>
the closing tag for <title> is <title/>, not </title>
dear Dylan5797,
Thetag, counts as an<!DOCTYPE html>tag.<html>
sincerely,
Dabaws424
<!DOCTYPE html> doesn't count as <html> - http://stackoverflow.com/questions/9346954/doctype-html-what-does-it-meanbefore he did that?<script>
someone already won
- Jonathan50
-
1000+ posts
HTML5, CSS, and Bootstrap
No, <!DOCTYPE html> just specifies the type of the document. The rest of the page should still be wrapped in an <html> tag anyway.There is no <html> tag, <style> should be in <head> or <body> Quiz: Does this code work? (if not give an example why not) first one to answer correctly gets 5 favs<!DOCTYPE html>
<style type="text/css">
.btn {
background-color: red;
}
body {
background-color: black;
}
</style>
<title>Title<title/>
<body>
<h1>Title</h1>
<button class="btn">Button</button>
There is no <head>
the closing tag for <title> is <title/>, not </title>
dear Dylan5797,
Thetag, counts as an<!DOCTYPE html>tag.<html>
sincerely,
Dabaws424
- DrKat123
-
1000+ posts
HTML5, CSS, and Bootstrap
I dont care about favs. Quiz: Does this code work? (if not give an example why not) first one to answer correctly gets 5 favs<!DOCTYPE html>
<style type="text/css">
.btn {
background-color: red;
}
body {
background-color: black;
}
</style>
<title>Title<title/>
<body>
<h1>Title</h1>
<button class="btn">Button</button>
So i'll just answer this.
1. No head tags (start and end)
2. You used text/css
3. The <title/> tag should be </title>
4. No ending body tag
5. No ending HTML tag
- Jonathan50
-
1000+ posts
HTML5, CSS, and Bootstrap
and no starting HTML tag… I dont care about favs.
So i'll just answer this.
1. No head tags (start and end)
2. You used text/css
3. The <title/> tag should be </title>
4. No ending body tag
5. No ending HTML tag
- DrKat123
-
1000+ posts
HTML5, CSS, and Bootstrap
^^and no starting HTML tag… I dont care about favs.
So i'll just answer this.
1. No head tags (start and end)
2. You used text/css
3. The <title/> tag should be </title>
4. No ending body tag
5. No ending HTML tag
- NoMod-Programming
-
1000+ posts
HTML5, CSS, and Bootstrap
^^^^^and no starting HTML tag… I dont care about favs.
So i'll just answer this.
1. No head tags (start and end)
2. You used text/css
3. The <title/> tag should be </title>
4. No ending body tag
5. No ending HTML tag
- DrKat123
-
1000+ posts
HTML5, CSS, and Bootstrap
^^^^^^^^^and no starting HTML tag… I dont care about favs.
So i'll just answer this.
1. No head tags (start and end)
2. You used text/css
3. The <title/> tag should be </title>
4. No ending body tag
5. No ending HTML tag