Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Opening HTML file

I've created my HTML file using TextEditor (Mac), How can I open the file on other devices?

Marcos Rodriguez
Marcos Rodriguez
6,762 Points

to view that file you can open it with safari. That file is stored locally on your computer thats why you are able to see it on a browser however you can't access it on your phone because that file is not on your phone. One good way to see how the html file reacts to different device sizes is by changing the aspect ratio of the browser tab your html file is open to simulate a phone screen.

Thank you so much Fabian Forsström! My main goal was to make my website available to other people, for example, Google, Wikipedia, Treehouse etc.. Now I know that to achieve my goal I have to host my website.

Fabian Forsström
Fabian Forsström
7,978 Points

No problem mate! Anything else we are here for you! :)

If you think my answer helped please do rate it below. :)

1 Answer

Fabian Forsström
Fabian Forsström
7,978 Points

What is the purpose of opening the file on a different device. Like Marcos said, opening the file on another device obviously means transfering the file to said device. But I am curious: What is the goal?

I would recommend you download a text editor like; Brackets, Sublime text or Atom to edit and create new HTML files cause these programs let you write color coded code plus you can manage project files alot better within those programs.

If you would like to see your page on a smaller screen, opening the console in for example Chrome is a great way to do so without having to transfer the files to a smaller device.

Open chrome and open the developer tools. One of the shortcuts for this on a mac is:

CMD + SHIFT + C

Then press the button Toggle Device Toolbar or press:

CMD + SHIFT + M

At the top of the window you should see a dropdown with the item Responsive selected. Press that and choose the device you want.

I hope this helps in some way. :)

Cheers

(REPOST FROM COMMENT TO ANSWER)