Changing the color of <li> text to yellow in html - html-lists

I want to change the color of my li tag text into yellow. My background color is black and it seems that the default color in the li tag is black, so i want to change it to something bright like yellow or white. Please advice.
<h4>MA</h4>
<ul>
<li>welcome to my city</li>
<li>hello world.</li>
</ul>

Just to get you started, there are 2 ways of styling an html element:
Inline styling
Via css
You have to do some reading, as useSticks suggested but the quick and dirty way to get past through this is to do it by inline styling.
In any element, you can have a style attribute and have some values declared there. For example, in your case:
<ul>
<li style="color:yellow">i am yellow</li>
<li style="background:black;color:red;">I am red with black background</li>
</ul>
Play around and do some reading, css is quite a big chapter to discuss here.

Related

how to add boundary to an image in webpage

<html>
<h3> MY FIRST WEBPAGE </h3>
<H1> DESIGNING MY FIRST WEBPAGE </H1>
<title> MY FIRST TAB </title>
<img src="3333.jpg"
width="800"
height="500" >
<style>
body {font:12px Verdana,Arial; color #428bca; background-color:#5bc0de}
</style>
</html>
how to add boundary to image . ineed to knwo like how toadd a red coloured boundary to enclose the image in a table format
Add Borders to a Images using HTML & CSS
Using HTML/CSS to add borders to an image is easier than what you think. Before you add an image to your post in the text module, you need to switch to the text editor. Then, you will add the image and see the HTML code of the picture. This will look like the following images.

After adding the image to the text module, type this style=”border:5px solid #000000; padding:3px; margin:5px” to add the borders to your images. It will look like the next picture.

As result of that code, the image will look similar to the next picture.

Feel free to make any change to the border width, color, padding, and margin to your images. Also, you can change to the visual editor after you are done with the picture to see the changes that you’ve made. Let us know below if you have any comments or questions; we’d love to hear from you.

Pandoc 2.x renders images' alternative texts in an inaccessible fashion

Since I upgraded from Pandoc v1.19 to 2.9, decorative images are not exported as expected anymore.
First of all, when generating HTML from ![](test.jpg), in v1.19 a <p class="figure"> structure was wrapped around the image, but now it's only a <p>:
<p>
<img src="test.jpg">
</p>
This makes it harder to style in line with other images that have an alternative text.
But what's really a problem here: there's no alt="" attribute produced anymore! This means that e.g. screen readers will not recognise this as a decorative image anymore.
So let's see what happens to an image with an actual alternative text, e.g. when generating HTML from ![Hello](test.jpg):
<div class="figure">
<img src="test.jpg" alt="">
<p class="caption">Hello</p>
</div>
Here we get a class="figure" in the surrounding element, but now it's a <div> instead of a <p> (I don't bother too much about this, but again, it makes it harder to style everything the same).
What again is a big problem though is the fact that the alt attribute is now set empty: this prevents screen readers from perceiving them at all, which is horribly wrong! I guess that Pandoc concludes that having alternative text and caption would be redundant, which is correct, and that the caption below would be the right thing to show - which it is not.
The right structure would look something like this:
<div class="figure">
<img src="test.jpg" alt="Hello"><!-- Leave the alternative text on the image -->
<p class="caption" aria-hidden="true">Hello</p><!-- Hide the redundant visual alternative text from screen readers -->
</div>
Any reason why this behaviour would make sense? Can it be changed somehow? Otherwise I will have to fiddle around with some post-processing JavaScript...
The ![](test.jpg) example is no longer treated as a figure, because pandoc now requires that
the image is the only element in a paragraph, and
it has a caption.
Wrapping of figures with <div> happens when exporting to HTML4. Using the latest pandoc 2.9.2.1 and running pandoc -t html5 on the input ![Hello](test.jpg)
<figure>
<img src="test.jpg" alt="" /><figcaption>Hello</figcaption>
</figure>
The rationale for emitting an empty alt attribute is that screen readers would read the caption twice: first the alt, then the figcaption. Your suggestion seems much better, please open an issue.
If you can't wait for a new release, then use a Lua filter to create figures the way you like:
function Para (p)
if #p.content == 1 and p.content[1].t == "Image" then
local image = p.content[1]
local figure_content = pandoc.List{}
figure_content:insert(image)
figure_content:insert(
pandoc.RawInline('html', '\n<p class=caption aria-hidden="true">'))
figure_content:extend(image.caption)
figure_content:insert(pandoc.RawInline('html', '</p>'))
local attr = pandoc.Attr("", {"figure"})
return pandoc.Div({pandoc.Plain(figure_content)}, attr)
end
end

CKEditor unable to override styles on non-span tags?

I am trying to use CKEditor to edit some html created with a different tool (Quill) that has a different opinion on which tags one should place style attributes.
For example:
<p>
<strong style="color: rgb(230, 0, 0);">TEST</strong>
</p>
When one tries to use CKEditor (standalone V4.6) to change the color of this line of text one gets the following (which doesn't work due to the new color being overridden by the old color)
<p>
<span style="color:#00ffff;">
<strong style="color: rgb(230, 0, 0);">TEST</strong>
</span>
</p>
It seems obvious that any inner tags should get their color style removed when the color is set but I have been unable to find a way to configure CKEditor to do that. It seems like a bug that it doesn't. Is there any way to get CKEditor to do this? (this applies to all style properties, not just color)
If not, is there a way to get CKEditor to normalize the html on load so that all styles are extracted out to spans?

CKeditor does not seem to be rendering the correct text colour when retrieving data?

I asked about this question a few months back, but unfortunately it has not solved my issue, so I am asking it again with more information.
I am using CKeditor 4.4.5
Original Question
I have experimented with the online demo of CKeditor. What works is that the colour is rendered when making the edit in CKeditor, however when one retrieves a content with the coloured span element within it, as it correctly should do, the colour is not rendered in CKeditor. Also it seems that tags are not being stripped out at all. It just seems that CKeditor is not rendering something like :
<textarea class="RTE" cols="20" disabled="True" id="Content" name="Content"
rows="2">
<h1><span style="color:red">I should be coloured red</span></h1>
</textarea>
with:
I should be coloured red
in red.
I have checked for "!important", in relevant CSS, and I cannot see any that would affect this text.
Thoughts on why CKeditor is not respecting the "color" attribute of this "span" element when retrieving/displaying data, rather than initially editing it would be very helpful.
Thanks in advance.
EDIT
Source in "source" view:
<h1><span style="color:red">I should be coloured red</span></h1>
EDIT2
This works:
<p style="color:red">I should be coloured red</p>
EDIT3
This works
<h1 style="color:red">XXX red text XXX</h1>
EDIT4
This does not work:
<p><span style="color:red">XXX red text XXX<</span></p>
It seems I have some code in my CKeditor config which is causing this behaviour, but not sure why. When I comment it out, my colour coding works. Also I have turned ACF off, as I fine all my inline style attributes gets stripped out. So I have altered my config to :
//config.protectedSource.push(/<span[\s\S]*?\>/g); //allows beginning <span> tag - now commented out
//config.protectedSource.push(/<\/span[\s\S]*?\>/g); //allows ending </span> tag - now commented out
config.allowedContent = true; //Added

Zurb-Foundation: Reducing base font size causes toggle-topbar button to display too early

I am new to Zurb-Foundation, so bear with me on this question.
I am monkeying with the top-bar element and want to have the toggle-topbar button for small displays. I also want to reduce the base font size for the site; but when I set the base font size to 12px in _variables.scss, the toggle-topbar icon shows up way too early, something like 900px or so I guess. When I leave base font size at 100%, everything works as expected. My base font size is set in _variables.scss as follows:
$base-font-size: 12px !default;
$em-base: $base-font-size !default;
My html is as follows:
<nav class="top-bar">
<ul class="title-area">
<li class="name">
<h1>#Html.ActionLink("Application name", "Index", "Home")</h1>
</li>
<li class="toggle-topbar menu-icon">
<span>Menu</span>
</li>
</ul>
</nav>
Is there something else I need to do to make sure that setting my base font size does not corrupt the toggle-topbar setting?
I am going to mark this question as answeres because I learned (as I normally do in these situations) that the problem was in my expectations, not the functionality.
Basically, the menu icon appears at width 768px which is as designed. I was thinking it would be at a smaller number. I imagine at somt Zurb Foundation will provide more breakpoint options or I will have to do it myself.

Resources