0
Under review

How to begin styling with css

Jenjen 3 years ago in iPad updated by Alexander Blach (Developer) 3 years ago 1

Hi I have just finished writing my code on html using Textastic and I just don’t know how to get around opening another tab and setting it to css so that I begin styling my code


Answer

+1
Answer
Under review

I assume that the .html file is stored somewhere in the "Local Files" or in the "iCloud" location.

  • In the same folder, tap the "+" button in the bottom toolbar.
  • Enter a file name with a ".css" file extension -> this opens a new CSS file in a new tab.
  • In the .html file, add a link tag to the head section as described at https://www.w3schools.com/tags/tag_link.asp 
  • If you now open the web preview using the glasses icon while the tab with the .html file is open, you should see the CSS styles from the .css file applied. You can also open the web preview on the .css file and enter the path to the .html file in the address bar of the web preview. This allows you to preview the website while previewing the .css file without having to switch to the .html file first.

Alternatively, you can add the CSS directly to the .html file using a style tag in the header section as described at https://www.w3schools.com/tags/tag_style.asp.

+1
Answer
Under review

I assume that the .html file is stored somewhere in the "Local Files" or in the "iCloud" location.

  • In the same folder, tap the "+" button in the bottom toolbar.
  • Enter a file name with a ".css" file extension -> this opens a new CSS file in a new tab.
  • In the .html file, add a link tag to the head section as described at https://www.w3schools.com/tags/tag_link.asp 
  • If you now open the web preview using the glasses icon while the tab with the .html file is open, you should see the CSS styles from the .css file applied. You can also open the web preview on the .css file and enter the path to the .html file in the address bar of the web preview. This allows you to preview the website while previewing the .css file without having to switch to the .html file first.

Alternatively, you can add the CSS directly to the .html file using a style tag in the header section as described at https://www.w3schools.com/tags/tag_style.asp.