Today I Learnt Some HTML.
Total Days 2
Total Earned $0.
I learnt that a “tag” is a bit of code that tell a browser what to do. For a tag to work you have to <open> it and then </close> it.
- If you want some text on a webpage you put it inside a <p>aragraph tag. Html doesn’t acknowledge line breaks so if you want a new paragraph you need to use a <br>eak tag. <br>eak tags can be self-closing when written as <br />. If you want a line instead of just a line break then use a <hr /> tag for a horizontal rule (like the short grey line above).
- You can format text. Use the <strong> tag for bold, <em>phasis tag for italics, the <u>nderline tag or the <strike>through for strikethrough text. There are also 6 sizes of header text. <h1> is the largest and <h6> the smallest.
- You can also create lists. <ol> for numbered lists and <ul> for bullet points. In between the open and close tags each list item starts with the <li>st tag.
- Adding links involves using the <a> tag. You need to provide the hyperlink reference for the link inside the <a> tag. Depending on where the hyperlink reference points the link can be internal, external or it can link to a different section on the same web page.
A link to google would look like <a href=“http://www.google.com”> Google </a>
- You can pop an image onto a page using the <img> tag. Images can be internal and external just like links. You can also adjust the <height> and/or <width> by adding the tags and the required size.
Images always need a source so embedding an would look like:
<img src= “url of image” width=“100”/>
The other thing I learnt is that if you want to write a blog post about html tags the tags won’t show up in the post because the browser will interpret them as html. Every < at the beginning of a tag needs to be replaced with
<. This is known as html entity. There are different entities for different html symbols. Use this website for reference.
The only resource I have used so far is The Complete Web Developer Course. Please use.