More HTML Examples

Test #3: Add a header tag to change the font size. Add '<H1>' around 'Hello Dean!'. This tag is a "header" tag, and the number determines how big to make the header text. Note that you can edit your local 'hello.html' file and copy it, or you can edit the copy in /var/www/html by running sudo emacs -nw /var/www/html/hello.html:

<html>

    <head>

        <title>Greetings</title>

    </head>

    <body>

        <H1>Hello Dean!</H1>

    </body>

</html>

 

Save and exit the file. Copy it to /var/www/html if you edited the local copy in your home directory. Then refresh your browser to view the change. What has changed?

Test #4: add more HTML tags. Here's an example with a few more HTML tags and features:

<html>

    <head>

        <title>Greetings</title>

    </head>

    <body bgcolor="blue">

        <center>

        <br>

        <br>

        <H1>Hello Dean!</H1>

        <P>Click <A HREF=\"www.firstinspires.org\">here</A> to go to FIRST!</P>

        </center>

    </body>

</html>

 

Notice that the 'body' tag includes the 'bgcolor' parameter to change the background color of the whole webpage, and that the 'br' tag has no ending tag. The 'br' tag is for "line breaks". Also, we added a web link to the FIRST website.

Here's a good website I use when I have questions about HTML: http://www.htmlbyexample.com.

Copyright 2020
  • Facebook - Black Circle
  • Twitter - Black Circle
  • YouTube - Black Circle
  • Instagram - Black Circle
Follow us on these platforms