Tables look different in code academy and notepad

html-css
notepad

#1

Hi Everyone,

This is my first time posting to a forum. I read all the instructions, so hopefully I am in the right place.

I got up to the table lesson today and passed it. I decided to test my new knowledge in a text editor outside of code academy. I choose notepad. I noticed that for some reason when I create a table the border doesn't automatically show up and I have to add a style for it to show up. When I did the exercise in code academy the border automatically showed up. I was hoping someone would know why this is? I wasn't sure if this had to do with the text editor?

Thanks,

Kristen


#2

What is the exercise No you are referring to?


#3

The url of the exercise + the code would be very useful to give us a better understanding of the problem, good you read the instructions first :slightly_smiling:


#4

Hi All,
Thanks for responding!

The exercise is in HTML Basics lll. The sections are called learning about tables and better tables. I put the link below. I didn't re-create the exact same table that we did in the exercise, but just a simple table using what we learned. I just wanted to practice and make sure I got this before I moved forward. I put the code of the table I created below so you could see the difference. I just noticed that when I look at this table in my browser it doesn't have a border, but in the code in the exercise we had a border and I think it was automatically there without adding any style to it. Then at the end of exercise we had to use a style attribute to collapse the border.I just want to make sure I am not missing something. Thank you so much for your help!

https://www.codecademy.com/en/courses/web-beginner-en-f8mcL

<!DOCTYPE html>
<html>
	<head>
		<title>My First Table</title>
	</head>

	<body>
	
		<table>
		<thead>
			<tr>
			<th colspan="2">My First Table</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>First</td>
				<td>second</td>
			</tr>
			<tr>
				<td>third</td>
				<td>fourth</td>
			</tr>
			<tr>
				<td>fifth</td>
				<td>sixth</td>
			</tr>
		</tbody>
		</table>

#5

Looks to me like there is no border in the exercise either:

unless you add a border property to the table opening tag:

<table border="1px">