HTML (only), Image appears when hovering mouse over text [duplicate] - html

This question already has an answer here:
In HTML, how can you make an image appear while you are hovering over text?
(1 answer)
Closed 5 years ago.
can anyone tell me if it is possible to make an image appear when you hover the mouse over a text?
I'm doing a school project and I can only use html, I've seen a lot of answers but most require CSS or jQuery and other languages.
Thanks

HTML was not designed for that purpose, it was meant to give a website basic structure. It is really only used to organize and emphasis (and even that last one is mainly done from css or js) the text of a website.

Try this. The solution isn't solely HTML, but it's pretty much impossible to do what you want only using that.

Related

Simply transfer HTML code into other HTML files [duplicate]

This question already has answers here:
Multiple webpages with common title and navigation bars
(4 answers)
Closed 2 years ago.
I would like to start a homepage for me. Every time I add a thing to index.html I have to add it to the links (in about.html etc.) as well.
How can I simplify that, that the new things of the index.html are automatically transferred directly into the other links (about.html etc.)?
Thanks for the help
The solution I used was to create a JS script that you would include in your HTML, that would add the HTML you want to the document :
let body = document.getElementsByTagName("body")[0];
body.insertAdjacentHTML("beforeend", "your html");
You could then put this script where you want to include the HTML.
I don't know if it's the best solution, but it works.
Right now, using vanilla HTML, there is no quick, easy, and simple way to do this. Using a backend framework like Django, this is easy, but that is really complicated and takes a while to learn!

How does one change the language of an HTML page? [duplicate]

This question already has answers here:
How to specify language of website? (HTML?)
(3 answers)
Closed 2 years ago.
Specifically, I am writing in AMP HTML, if there would be any conflictions.
I would like to approach a pretty cool concept of being able to change the language of an HTML page I am working on, just by the click of a button, like so:
<button>Parlez-vous Français?</button>
I would like the person do be able to click a button that would specifically translate the page into French. But it would be cool to add some animation to it too, like maybe a fade-out/fade-in sort of thing.
How would I be able to approach this?
You can simply change it in the HTML tag itself
<html lang="fr">
...
</html>
considering you know that it's an html attribute. There are many ways you can change it. Storing the change can either be on database or session storage. Hope this helps

Catching all inline css and its html tag [duplicate]

This question already has answers here:
Generating a stylesheet based on inline HTML styling?
(3 answers)
Closed 4 years ago.
I am refactoring legacy code of MVC framework html views. Many, many, many css styles are applied inline, which is bad practice.
Is there a tool to generate a css file from all the inline styles of an html file ?
The answer can be found here: Generating a stylesheet based on inline HTML styling?
I couldn't post it as an answer, because it told it was too trivial for an answer.
Maybe now after I added few more lines it will take it as an answer.
I believe you're looking for Inline CSS Extractor, their website is down, but github have the zip file, download it and open it in your local, I believe that will save you loads of time too.

Menu from external file [duplicate]

This question already has answers here:
What are the new frames? [closed]
(3 answers)
Closed 9 years ago.
I am now making a webpage and need a bit of help. Its been some time since Ive done my last page a few years ago. Back then I remember it was quite popular to use frames, but these days, this is basically no longer used.
What I used to do is have a horizontal menu on the top as a frame, and underneath it the content frame.
Now, currently I have a webpage again, where I would like to place a horizontal menu on the top of the page.
The menu is written in pure CSS and HTML. The CSS is loaded from an external file, but the problem I now have is that the menu is basically a DIV element, which however I have to put into each page separately.
I was just wondering there must be a way of making this simpler and have it somehow inserted from an external file again - sorry maybe it sounds confusing, but basically I am looking for an alternative of the frames used in the past. Many pages have menus and I am sure they do it somehow, because if I make a change in the menu, I dont want to be making these changes on all the hundreds of pages.
I dont ask for any specific coding etc. I can google that myself if I dont know how to do it, but I just need a general recommendation how to solve this. Just to summarize, the menu is in HTML+CSS and the pages are mostly PHP, some of them HTML.
I'd think it would mostly depend on the framework. You could just have one page, and use AJAX to load the content of each page, or you could have several php pages, all of which call some function at the beginning to set up the header, or you could use a ASP.NET master page or whatever your framework uses.
If you're using PHP, then the easiest way would be :
<?php include('my_page.html'); ?>
Be carefull of the path to your html page

Edit CSS Styling of HTML Select Button [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Is it possible to style a select box?
I would like to know if it is possible with CSS to change the styling of a HTML select field.
I want to make the button with the arrow inside transparent but keep the arrow there, so basically removing the button look of the arrow.
That is not possible to accomplish cross browser with only CSS.
To get nice looking select fields you must use javascript.
There are a couple libraries for this:
http://www.emblematiq.com/lab/niceforms/
http://uniformjs.com/
I am pretty sure you can find more if you just google for it.
http://bavotasan.com/2011/style-select-box-using-only-css/
be sure to read the comments too, this will probably not work in old(er) browsers, jquery is the better solution