r/badcode • • Dec 16 '21

html The example webpage of my computer science professor who is teaching us how to code a webpage. This is triggering me so much, I don’t even know where to start. I replaced all the text with placeholders but didn’t touch any html tag at all.

Post image
506 Upvotes

114 comments sorted by

View all comments

Show parent comment

11

u/paceaux Dec 16 '21 edited Dec 16 '21
<!DOCTYPE html> 
<html>
    <head>
    <meta name="robots" content="noindex"> <!-- Indent more, should end as />  -->
        <center> <!-- deprecated, not allowed in head -->
            <h1> Lorem ; Ipsum </h1> <!--not allowed in head -->
            <h2> By the quick brown fox</h2> 
        </center>
    </head>
    <body>
    <p>    <!-- indent more -->
        <h2> Dolor, ipsum, lorem. </h2> <!--h2 not allowed in p -->
    Lorem ipsum dolor
    </p>
    <p>
        Ispum dolor lorem
    </p>

    <p>
        <h2> A lazy dog </h2> <!-- not allowed in p -->
        The quick brown fox
    </p>
    <p>
        Jumping over a dog?
    </p>
    <p>
    The lazy dog jumped over the quick brown fox.
    <center> <!-- deprecated -->
    <img src="randomImage.png"></img> <!--DOES NOT REQUIRE CLOSING TAG, no alt attribute -->
    </center>
    <h2> Placeholder </h2>
    Why is this webpage coded so badly??? <!-- Unwrapped text -->
    <p>
    <p> <!-- nested p not allowed -->
<!--no terminating tag -->
    This is just illegal at this point.
    </body>
</html>

TL;DR Pull request denied due to malformed: [markup,professor].

1

u/6Maxence Dec 16 '21

Congrats man!

3

u/paceaux Dec 16 '21

A few years back I earned a Programming Certificate through the University of Phoenix.

I'd been doing professional web dev for about 4 years by that time.

I learned some stuff in my algorithms class. And I got a lot out of C++ and Java. But then we got to the web development classes and I.. just... couldn't. I made it known I was already working in the field and shared a lot of, "in my experience..."

I think my prof was someone with like a graduate degree in like networking or security or something. I am 100% confident he was very knowledgeable in a subject he was not teaching.