

an image) float at the right of the pageĬlear: right – stops the floating happen Padding: 10px 20px 10px 20px – sets the margin within an item (clockwise from the top)įloat: right – makes an object (e.g.

Margin: 10px 20px 10px 20px – sets the margin around an item (clockwise from the top) Width: 100% – sets the width (in this case as a percentage rather than an absolute)Ĭolor: #000000 – sets the text colour (in this case to black using hex code)įont-family: "Times New Roman", Times, serif – sets the font (with fallback options)įont-weight: bold – another way of making text bold Height: 200px – sets the height of an object (e.g. example Īnother div in the “example” class Defining styles in a tag ”Important text” – renders as bold by default Listsīullet point one in an list of bullet points īullet point two (if you want a numbered list, use rather than ) ĭefines style information (often in the section, but not always) Ī section of your document (used a lot with styles and scripts) īasically an inline version of a div (e.g. ”Emphasis” – renders as italic by default – (on its own, with no closing tag) inserts an image at full size with alt text. – (on its own, with no closing tag) inserts a single line break Heading at level 1 (there’s also h2, h3, etc.) Stuff that’s not on your page but is relevant to it (e.g. If you're a member of the University of York, you can use your personal web space to host webpages, by putting the. If you want your webpage(s) to be accessible to others on the internet, you'll need to host them somewhere.

Alternatively you can just drag the file into your browser, or (in some browsers) use File > Open File (or something similar).ĭoing this doesn't mean anyone else could see it on the internet, but it gives you the chance to see the code you're writing. Press ctrl-O (cmd-O in a Mac) to open the “Open” dialogue, navigate to your saved. To view what your webpage would look like, you'll need to open a web browser (e.g. html and voila, you have a file containing your code! You can write your HTML code in a text file, then save it with the file extension. All you need is a text editor, like Notepad on Windows or TextEdit on a Mac. Unlike some other coding languages, you don't need any specialist software to start having a go writing web pages.
