HTML For Formatting Blogs #2

+8

Hello, all. This is the second blog about HTML for formatting blogs. Malkiboy, the author of the first blog, allowed me to make this blog since he didn't have enough time to make it.



Strikethroughs


To get a strikethrough, you do the following:
<s>
Whatever you would like to strikethrough
</s>

The outcome should look like this:

Whatever you would like to strikethrough


Horizontal Lines

To get a horizontal line, you do the following:

<hr>

Outcome:



Animated Text

<marquee width="60%" direction="up" height="19px">
This is a sample scrolling text that has scrolls in the upper direction.
</marquee>

Notice where it says direction="up". That can be changed to "down", "left", or "right"!

The outcome for scrolling text (up) should look something like this:

This is a sample scrolling text that has scrolls in the upper direction.

Rainbow Text

Credits to user Abc85 for showing Malkiboy the code for this in his first blog.

To get rainbow text, you do the following: (Scroll right with the provided scroll bar to see all the code)

<h3 style="background-image: linear-gradient(to left, violet, indigo, blue, green, yellow, orange, red); -webkit-background-clip: text; -webkit-text-fill-color: transparent;">
The text you want to put
</h3>

Outcome:

The text you want to put

Note: As you go on, the colours will change in the colour order of a rainbow as you have more text.


Images

<img src="image URL">

You can use other tags to specify the image. For adding a border, type border="1" after "image URL". The border can be any number depending on how thick you would like it to be. To change the image size, type width="number" and height="number" after "image URL". And to change image align (whether it should be right, left, or in the middle of the code), add align="right", or align="left". So full image code would be like this:
<img src="image URL" border="0" width="15" height="17" align="left">

Link Tag Add-Ons

In the previous blog, you learned about the <a href tag. You can specify it with more complex code.

The first one is the target="_blank code. This makes it open in a new tab. Add it after the last quote in the normal code.

The second one is the title="title" code. You can specify a title for the link (in "title") so that when the user hovers over the link, it will say something.

The next one is the style="color:blue" code. This causes the link to always stay blue and never turn purple, despite how many people click on it. Here is the full code:

<a href="https://google.com" target="_blank" style="color:blue" title="Google">
Whatever you want the link to say
</a>

Outcome:

Whatever you want the link to say

You can also use it to link to an email address. When clicked, it will create a blank email with the recipient as the person you would like to email to.

<a href="mailto:someone@example.com">Send email</a>

Outcome: (this sends an email to me!)

Send email


Tables

I am now going to show you how to make tables. It is a complicated process, with many tags that you can add. The <th> tags are for a new row while <td> are for a new cell. Here is some example code (you MUST include the CSS):

<style>
table, th, td {
  border: 1px solid black;
}
</style>


<table>
  <tr>
    <th>Month</th>
    <th>Savings</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
  </tr>
  <tr>
    <td>February</td>
    <td>$80</td>
  </tr>
</table>

Outcome (ignore the blue):

Month Savings
January $100
February $80

Yes, I know what you're thinking. This table looks extremely basic. You can add a lot of things to make it look better. First, look at the <style> place. The border, as you can see is 1px. You can change that to a higher number to make it thicker. It also says "solid black" and you can change the colour of that, too. The tag gives your table a caption. To change font colour, do it the same way as shown in the first blog. <h1> to <h6> tags also work in a table, when enclosed in a tag.

Another thing is a table caption. Use the <caption> tag to give your table a caption.

Lastly, we will explore table classes. Basically, the classes are different types of table formats. The most commonly used one is the standard-table class. If you use this class, you can have a neat table with different types of text, borders, and captions. When using this class, you can use the th colspan tag to merge two cells. It is a bit complex, but the example down below shows it. You will mostly use this class.

A good outcome will use this code:

<style>
table, th, td {
  border: 5px solid blue;
}
</style>
<table class="standard-table">
<caption>Table Caption</caption>
<tr><th colspan="2">Monthly Savings</th></tr>
<tr><td>January</td><td>$100</td></tr>
<tr><td>February</td><td>$200</td></tr>
<tr><td>March</td><td>$300</td></tr>
</table>

Outcome:

Table Caption
Monthly Savings
January$100
February$200
March$300

Yes, this may look very confusing. No worries! Let me run through the code.

First, the <caption> tag defines a table caption. This is not required if you have a header row like shown in this table. Now, you may notice the header row is a bit different. The colspan means that it merges the two top cells together. If there were three columns and you wanted to merge all three, the colspan would be equal to 3. As I said earlier, the <tr> tag defines a new row while the <td> tag defines a new cell in that row.

Note: For more information about tables, such as how to align them, go here.

Back to Top


Thank you for reading. Please tell me down in the comment section if anything is incorrect/you would like me to add anything. Thanks again :)
38 Comments
+1
Level 57
Sep 21, 2020
Big 9/21/2020 update - cleaner format, more code, and easier accessibility
+2
Level 75
May 9, 2020
Cool
+2
Level 56
May 9, 2020
Great Blog. I can resize my pics now.
+2
Level 69
May 10, 2020

Wow, I never knew about scrolling text thanks.

+3
Level 75
May 11, 2020

This is cool

+2
Level 68
May 11, 2020
I like this. It is very cool
+3
Level 68
May 11, 2020
Also congrats on 1,000 takes
+3
Level 60
May 13, 2020

This is amazing

+1
Level 57
May 13, 2020
No, it's not.
+1
Level 64
Apr 6, 2023
Why don't they scroll in comments??
+3
Level 78
May 16, 2020
What a load of rubbish I mean, Thanks very helpful :)
+1
Level 55
Aug 13, 2020
Great!
+1
Level 51
Aug 27, 2020

This is cool

+1
Level 43
Sep 10, 2020

I loved this! How to add an audio or a video in a blog or quiz?

+1
Level 57
Sep 10, 2020
https://www.jetpunk.com/users/sacheth9/blog/html-for-formatting-blogs-3
+1
Level 43
Sep 10, 2020

Thanks!

+1
Level 43
Sep 21, 2020
I would never be able to understand this It made a lot of sense thank you:)
+1
Level 43
Nov 16, 2020
How to put BG color on the table?
+1
Level 43
Dec 4, 2020
DON'T REMOVE THIS!
+1
Level 57
Dec 4, 2020
I will not, lol
+1
Level 43
Jan 2, 2021
The tables are without the borders. How fix it?
+1
Level 57
Jan 2, 2021
What do you mean?
+1
Level 43
Jan 2, 2021
This happen:

MonthSavings
January$100
February$80

The borders of the tables are blank. I’m preparing my second part of the blog of differences, and I need a table.

+1
Level 43
Jan 2, 2021
WHAT!? NOW THEY ARE WORKING!?
+1
Level 43
Jan 2, 2021
But in my blog, the blurb orders disappear. More strange, I write the border black, and it’s blue... 🤔
+1
Level 43
Jan 2, 2021
In addition, we note that the hoverable dropdown menus are being interpreted in one button, and some links.
+1
Level 43
Jan 3, 2021
Where I say blurb orders, I wanted to say borders. Sorry
+1
Level 65
Jan 29, 2021
Pandora, good blog, but may you fix one thing? The pink drop-down menu affects the whole page including the links to quizzes and stuff. Can you convert the coding to inline CSS? For example, instead of <style> p{background-color:red} </style> have <p style="background-color:red>TEXT<p>.
+1
Level 57
Jan 29, 2021
yeah i know i'm fixing it
+1
Level 61
Feb 12, 2021
Thank you Pandora!
+1
Level 63
Mar 14, 2021
Thanks so much Pandora! I finally understand how these Jetpunkers do magic.
+1
Level 65
Mar 31, 2021
If you want to make a billboard like at the movies, use this code:

<div style="padding:10px;border:1px solid black;border-radius:20px;font-size:20px;color:dodgerblue;outline:3px dotted yellow">

<marquee direction="right" scrollamount="30">

ℍ𝕖𝕝𝕝𝕠 𝕎𝕠𝕣𝕝𝕕! ;)

</marquee>

</div>

Result:

ℍ𝕖𝕝𝕝𝕠 𝕎𝕠𝕣𝕝𝕕! ;)

You obviously don't have to say "Hello World!" or use those copy-paste characters. If you want to find many different, unique copy-paste fonts, go here (swear not rickroll).

+1
Level 65
Mar 31, 2021
The scrollamount increases the speed, and you can do it without the marquee and outline if you just want the cool border.
+1
Level 51
Apr 1, 2021
Hello World!
+1
Level 71
May 10, 2021

hello

+1
Level 61
May 4, 2022
THE LINK FOR 3 ISN'T WORKING! Also how do you remove the thing so that when it hovers you can't see the link
+1
Level 57
May 4, 2022
Ummm why would you ever want to do that...?
+1
Level 21
Jul 19, 2023
Hello,

Very nice blog!

How can I make slideshows?