Learning about HTML and CSS

I enjoyed learning how to use HTML and CSS and the beginner tutorials made it a lot easier to figure out. It was good to refresh what we went over in class and learn a little more. I’ve used other word processing applications like R Markdown, which uses dollar signs to tag text, so it felt familiar to tag text in HTML. Although, the code also felt clunky using so many tags before and after the text. I found the form attribute of HTML to be really interesting as it is able to take a user’s input and is so relevant whenever you click a button on your computer screen.

<!DOCTYPE html>
<h3><title>Survey</title></h3>
<h3>What is your favorite drink at Sayles?</h3>
<form action="survey.php" method="post">
<h4><p>Name:</p></h4>
<p><input name="name" value="Your name"></p>
<p><strong><em>Mine is...<em></strong></p>
<p><input type="radio" name="mineis" value="hot chocolate"> hot chocolate</p>
<p><input type="radio" name="mineis" value="chai tea" checked> chai tea</p>
<p><input type="radio" name="mineis" value="coffee"> coffee</p>
<p><input type="radio" name="mineis" value="smoothies"> smoothies</p>
<p><input type="radio" name="mineis" value="featured drink"> featured drink</p>
<p><textarea rows="5" cols="18" name="comments">Add additional comments here</textarea></p>
<p><input type="submit"></p>
</form>

I tried to follow along on the CSS tutorial but I couldn’t figure out how to use external styles and link it to the HTML file. Below is the code that I used to link the two files. It was interesting to see how much you can do with CSS and that you can organize your styles for each attribute in the HTML file really well.

h3 {
color: purple;
background-color: #fcc;
font-size: 16px;
text-align: center;
}

<link rel="untitled text" href="style.css"></h3>
#Untitled text is the HTML file and style.css is the CSS file

Author: Saahithi

One comment

  1. Saahithi, the link tag goes in your HTML document and points to the external style sheet. Try to move that line into the HTML and troubleshoot from there

Leave a Reply

Your email address will not be published. Required fields are marked *